@@ -19,7 +19,7 @@ msgid ""
1919msgstr ""
2020"Project-Id-Version : Python 3.12\n "
2121"Report-Msgid-Bugs-To : \n "
22- "POT-Creation-Date : 2023-08-25 14:13 +0000\n "
22+ "POT-Creation-Date : 2023-08-25 22:29 +0000\n "
2323"PO-Revision-Date : 2021-06-28 00:52+0000\n "
2424"
Last-Translator :
Freesand Leo <[email protected] >, 2023\n "
2525"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -667,6 +667,8 @@ msgid ""
667667"changed from ``[]`` to ``[10]``. Since both the variables refer to the same"
668668" object, using either name accesses the modified value ``[10]``."
669669msgstr ""
670+ "在调用 :meth:`!append` 之后,该可变对象的内容由 ``[]`` 变为 ``[10]``。 "
671+ "由于两个变量引用了同一对象,因此用其中任意一个名称所访问到的都是修改后的值 ``[10]``。"
670672
671673#: ../../faq/programming.rst:461
672674msgid "If we instead assign an immutable object to ``x``::"
@@ -1732,6 +1734,10 @@ msgid ""
17321734" to calling :meth:`!extend` on the list and returning the list. That's why "
17331735"we say that for lists, ``+=`` is a \" shorthand\" for :meth:`!list.extend`::"
17341736msgstr ""
1737+ "要明白为什么会这样,你需要知道 (a) 如果一个对象实现了 :meth:`~object.__iadd__` 魔术方法,那么它就会在执行 ``+=`` "
1738+ "增强赋值时被调用,并且其返回值将在赋值语句中被使用;(b) 对于列表而言,:meth:`!__iadd__` 等价于在列表上调用 "
1739+ ":meth:`!extend` 并返回该列表。 所以对于列表我们可以这样说,``+=`` 就是 :meth:`!list.extend` "
1740+ "的“快捷方式”::"
17351741
17361742#: ../../faq/programming.rst:1409
17371743msgid "This is equivalent to::"
@@ -2303,7 +2309,7 @@ msgstr ""
23032309msgid ""
23042310"For example, here is the implementation of "
23052311":meth:`!collections.abc.Sequence.__contains__`::"
2306- msgstr ""
2312+ msgstr "例如,以下是 :meth:`!collections.abc.Sequence.__contains__` 的实现代码:: "
23072313
23082314#: ../../faq/programming.rst:1916
23092315msgid ""
0 commit comments