File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -234,6 +234,9 @@ msgid ""
234234"only be added if there is not a matching key in *a*. Return ``0`` on success"
235235" or ``-1`` if an exception was raised."
236236msgstr ""
237+ "对映射对象 *b* 进行迭代,将键值对添加到字典 *a*。 *b* 可以是一个字典,或任何支持 :c:func:`PyMapping_Keys` 和 "
238+ ":c:func:`PyObject_GetItem` 的对象。 如果 *override* 为真值,则如果在 *b* 中找到相同的键则 *a* "
239+ "中已存在的相应键值对将被替换,否则如果在 *a* 中没有相同的键则只是添加键值对。 当成功时返回 ``0`` 或者当引发异常时返回 ``-1``。"
237240
238241#: ../../c-api/dict.rst:214
239242msgid ""
@@ -243,6 +246,9 @@ msgid ""
243246"argument has no \" keys\" attribute. Return ``0`` on success or ``-1`` if an"
244247" exception was raised."
245248msgstr ""
249+ "这与 C 中的 ``PyDict_Merge(a, b, 1)`` 一样,也类似于 Python 中的 ``a.update(b)``,差别在于 "
250+ ":c:func:`PyDict_Update` 在第二个参数没有 \" keys\" 属性时不会回退到迭代键值对的序列。 当成功时返回 ``0`` "
251+ "或者当引发异常时返回 ``-1``。"
246252
247253#: ../../c-api/dict.rst:223
248254msgid ""
@@ -253,6 +259,9 @@ msgid ""
253259"if an exception was raised. Equivalent Python (except for the return "
254260"value)::"
255261msgstr ""
262+ "将 *seq2* 中的键值对更新或合并到字典 *a*。 *seq2* 必须为产生长度为 2 的用作键值对的元素的可迭代对象。 当存在重复的键时,如果 "
263+ "*override* 真值则最后出现的键胜出。 当成功时返回 ``0`` 或者当引发异常时返回 ``-1``。 等价的 Python "
264+ "代码(返回值除外)::"
256265
257266#: ../../c-api/dict.rst:238
258267msgid "Clear the free list. Return the total number of freed items."
You can’t perform that action at this time.
0 commit comments