@@ -11,7 +11,7 @@ msgid ""
1111msgstr ""
1212"Project-Id-Version : Python 3.11\n "
1313"Report-Msgid-Bugs-To : \n "
14- "POT-Creation-Date : 2023-09-01 14:43 +0000\n "
14+ "POT-Creation-Date : 2023-09-08 14:42 +0000\n "
1515"PO-Revision-Date : 2023-05-24 02:08+0000\n "
1616"
Last-Translator :
Rafael Fontenelle <[email protected] >, 2023\n "
1717"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -88,18 +88,14 @@ msgstr ""
8888"使用 *key* 作为键将 *val* 插入字典 *p*。 *key* 必须为 :term:`hashable`;如果不是,则将引发 "
8989":exc:`TypeError`。 成功时返回 ``0``,失败时返回 ``-1``。 此函数 *不会* 附带对 *val* 的引用。"
9090
91- #: ../../c-api/dict.rst:75
91+ #: ../../c-api/dict.rst:73
9292msgid ""
93- "Insert *val* into the dictionary *p* using *key* as a key. *key* should be a"
94- " :c:expr:`const char*` UTF-8 encoded bytes string. The key object is "
95- "created using ``PyUnicode_FromString(key)``. Return ``0`` on success or "
96- "``-1`` on failure. This function *does not* steal a reference to *val*."
93+ "This is the same as :c:func:`PyDict_SetItem`, but *key* is specified as a "
94+ ":c:expr:`const char*` UTF-8 encoded bytes string, rather than a "
95+ ":c:expr:`PyObject*`."
9796msgstr ""
98- "使用 *key* 作为键将 *val* 插入到字典 *p* 中。 *key* 应为 :c:expr:`const char*` UTF-8 "
99- "编码的字节串。 键对象是使用 ``PyUnicode_FromString(key)`` 创建的。 成功时返回 ``0``,失败时返回 ``-1``。 "
100- "此函数 *不会* 偷取对 *val* 的引用。"
10197
102- #: ../../c-api/dict.rst:83
98+ #: ../../c-api/dict.rst:80
10399msgid ""
104100"Remove the entry in dictionary *p* with key *key*. *key* must be "
105101":term:`hashable`; if it isn't, :exc:`TypeError` is raised. If *key* is not "
@@ -110,23 +106,21 @@ msgstr ""
110106":exc:`TypeError`。 如果字典中没有 *key*,则会引发 :exc:`KeyError`。 成功时返回 ``0`` 或者失败时返回 "
111107"``-1``。"
112108
113- #: ../../c-api/dict.rst:91
109+ #: ../../c-api/dict.rst:88
114110msgid ""
115- "Remove the entry in dictionary *p* which has a key specified by the UTF-8 "
116- "encoded bytes string *key*. If *key* is not in the dictionary, "
117- ":exc:`KeyError` is raised. Return ``0`` on success or ``-1`` on failure ."
111+ "This is the same as :c:func:`PyDict_DelItem`, but *key* is specified as a "
112+ ":c:expr:`const char*` UTF-8 encoded bytes string, rather than a "
113+ ":c:expr:`PyObject*` ."
118114msgstr ""
119- "移除字典 *p* 中由 UTF-8 编码的字节串 *key* 指定的键的条目。 如果字典中不存在 *key*,则会引发 :exc:`KeyError`。"
120- " 成功时返回 ``0``,失败时返回 ``-1``。"
121115
122- #: ../../c-api/dict.rst:99
116+ #: ../../c-api/dict.rst:95
123117msgid ""
124118"Return the object from dictionary *p* which has a key *key*. Return "
125119"``NULL`` if the key *key* is not present, but *without* setting an "
126120"exception."
127121msgstr "从字典 *p* 中返回以 *key* 为键的对象。 如果键名 *key* 不存在但 *没有* 设置一个异常则返回 ``NULL``。"
128122
129- #: ../../c-api/dict.rst:104
123+ #: ../../c-api/dict.rst:100
130124msgid ""
131125"Exceptions that occur while this calls :meth:`~object.__hash__` and "
132126":meth:`~object.__eq__` methods are silently ignored. Prefer the "
@@ -135,13 +129,13 @@ msgstr ""
135129"在调用 :meth:`~object.__hash__` 和 :meth:`~object.__eq__` 方法时发生的异常将被静默地忽略。 建议改用 "
136130":c:func:`PyDict_GetItemWithError` 函数。"
137131
138- #: ../../c-api/dict.rst:108
132+ #: ../../c-api/dict.rst:104
139133msgid ""
140134"Calling this API without :term:`GIL` held had been allowed for historical "
141135"reason. It is no longer allowed."
142136msgstr "在不保持 :term:`GIL` 的情况下调用此 API 曾因历史原因而被允许。 现在已不再被允许。"
143137
144- #: ../../c-api/dict.rst:115
138+ #: ../../c-api/dict.rst:111
145139msgid ""
146140"Variant of :c:func:`PyDict_GetItem` that does not suppress exceptions. "
147141"Return ``NULL`` **with** an exception set if an exception occurred. Return "
@@ -150,7 +144,7 @@ msgstr ""
150144":c:func:`PyDict_GetItem` 的变种,它不会屏蔽异常。 当异常发生时将返回 ``NULL`` **并且** 设置一个异常。 "
151145"如果键不存在则返回 ``NULL`` **并且不会** 设置一个异常。"
152146
153- #: ../../c-api/dict.rst:123
147+ #: ../../c-api/dict.rst:119
154148msgid ""
155149"This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a "
156150":c:expr:`const char*` UTF-8 encoded bytes string, rather than a "
@@ -159,7 +153,7 @@ msgstr ""
159153"这与 :c:func:`PyDict_GetItem` 一样,但 *key* 是由一个 :c:expr:`const char*` UTF-8 "
160154"编码的字节串来指定的,而不是 :c:expr:`PyObject*`。"
161155
162- #: ../../c-api/dict.rst:129
156+ #: ../../c-api/dict.rst:125
163157msgid ""
164158"Exceptions that occur while this calls :meth:`~object.__hash__` and "
165159":meth:`~object.__eq__` methods or while creating the temporary :class:`str` "
@@ -171,7 +165,7 @@ msgstr ""
171165":class:`str` 对象期间发生的异常将被静默地忽略。 建议改用 :c:func:`PyDict_GetItemWithError` "
172166"函数并附带你自己的 :c:func:`PyUnicode_FromString` *key*。"
173167
174- #: ../../c-api/dict.rst:138
168+ #: ../../c-api/dict.rst:134
175169msgid ""
176170"This is the same as the Python-level :meth:`dict.setdefault`. If present, "
177171"it returns the value corresponding to *key* from the dictionary *p*. If the"
@@ -184,30 +178,30 @@ msgstr ""
184178"里面对应的值。如果键不存在,它会和值 *defaultobj* 一起插入并返回 *defaultobj* 。这个函数只计算 *key* "
185179"的哈希函数一次,而不是在查找和插入时分别计算它。"
186180
187- #: ../../c-api/dict.rst:148
181+ #: ../../c-api/dict.rst:144
188182msgid ""
189183"Return a :c:type:`PyListObject` containing all the items from the "
190184"dictionary."
191185msgstr "返回一个包含字典中所有键值项的 :c:type:`PyListObject`。"
192186
193- #: ../../c-api/dict.rst:153
187+ #: ../../c-api/dict.rst:149
194188msgid ""
195189"Return a :c:type:`PyListObject` containing all the keys from the dictionary."
196190msgstr "返回一个包含字典中所有键(keys)的 :c:type:`PyListObject`。"
197191
198- #: ../../c-api/dict.rst:158
192+ #: ../../c-api/dict.rst:154
199193msgid ""
200194"Return a :c:type:`PyListObject` containing all the values from the "
201195"dictionary *p*."
202196msgstr "返回一个包含字典中所有值(values)的 :c:type:`PyListObject`。"
203197
204- #: ../../c-api/dict.rst:166
198+ #: ../../c-api/dict.rst:162
205199msgid ""
206200"Return the number of items in the dictionary. This is equivalent to "
207201"``len(p)`` on a dictionary."
208202msgstr "返回字典中项目数,等价于对字典 *p* 使用 ``len(p)``。"
209203
210- #: ../../c-api/dict.rst:172
204+ #: ../../c-api/dict.rst:168
211205msgid ""
212206"Iterate over all key-value pairs in the dictionary *p*. The "
213207":c:type:`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` "
@@ -225,18 +219,18 @@ msgstr ""
225219":c:expr:`PyObject*` 变量,它们将分别使用每个键和值来填充,或者也可以为 ``NULL``。 通过它们返回的任何引用都是暂借的。 "
226220"*ppos* 在迭代期间不应被更改。 它的值表示内部字典结构中的偏移量,并且由于结构是稀疏的,因此偏移量并不连续。"
227221
228- #: ../../c-api/dict.rst:183
222+ #: ../../c-api/dict.rst:179
229223msgid "For example::"
230224msgstr "例如:"
231225
232- #: ../../c-api/dict.rst:193
226+ #: ../../c-api/dict.rst:189
233227msgid ""
234228"The dictionary *p* should not be mutated during iteration. It is safe to "
235229"modify the values of the keys as you iterate over the dictionary, but only "
236230"so long as the set of keys does not change. For example::"
237231msgstr "字典 *p* 不应该在遍历期间发生改变。在遍历字典时,改变键中的值是安全的,但仅限于键的集合不发生改变。例如::"
238232
239- #: ../../c-api/dict.rst:218
233+ #: ../../c-api/dict.rst:214
240234msgid ""
241235"Iterate over mapping object *b* adding key-value pairs to dictionary *a*. "
242236"*b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` "
@@ -249,7 +243,7 @@ msgstr ""
249243":c:func:`PyObject_GetItem` 的对象。 如果 *override* 为真值,则如果在 *b* 中找到相同的键则 *a* "
250244"中已存在的相应键值对将被替换,否则如果在 *a* 中没有相同的键则只是添加键值对。 当成功时返回 ``0`` 或者当引发异常时返回 ``-1``。"
251245
252- #: ../../c-api/dict.rst:228
246+ #: ../../c-api/dict.rst:224
253247msgid ""
254248"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to "
255249"``a.update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall "
@@ -261,7 +255,7 @@ msgstr ""
261255":c:func:`PyDict_Update` 在第二个参数没有 \" keys\" 属性时不会回退到迭代键值对的序列。 当成功时返回 ``0`` "
262256"或者当引发异常时返回 ``-1``。"
263257
264- #: ../../c-api/dict.rst:237
258+ #: ../../c-api/dict.rst:233
265259msgid ""
266260"Update or merge into dictionary *a*, from the key-value pairs in *seq2*. "
267261"*seq2* must be an iterable object producing iterable objects of length 2, "
@@ -282,14 +276,10 @@ msgstr "object -- 对象"
282276msgid "dictionary"
283277msgstr "dictionary -- 字典"
284278
285- #: ../../c-api/dict.rst:73
286- msgid "PyUnicode_FromString()"
287- msgstr "PyUnicode_FromString()"
288-
289- #: ../../c-api/dict.rst:164
279+ #: ../../c-api/dict.rst:160
290280msgid "built-in function"
291281msgstr "内置函数"
292282
293- #: ../../c-api/dict.rst:164
283+ #: ../../c-api/dict.rst:160
294284msgid "len"
295285msgstr "len"
0 commit comments