@@ -1597,11 +1597,11 @@ msgstr "如何按其他列表中的值对一个列表进行排序?"
15971597msgid ""
15981598"Merge them into an iterator of tuples, sort the resulting list, and then "
15991599"pick out the element you want. ::"
1600- msgstr ""
1600+ msgstr "将它们合并到元组的迭代器中,对结果列表进行排序,然后选择所需的元素。 "
16011601
16021602#: ../../faq/programming.rst:1386
16031603msgid "An alternative for the last step is::"
1604- msgstr ""
1604+ msgstr "最后一步的替代方案是:: "
16051605
16061606#: ../../faq/programming.rst:1391
16071607msgid ""
@@ -1629,6 +1629,7 @@ msgid ""
16291629"which embody both the data (attributes) and code (methods) specific to a "
16301630"datatype."
16311631msgstr ""
1632+ "``类`` 是通过执行类语句创建的特定对象类型。``类对象`` 被当作模板来创建实例对象,实例对象包含了特定于数据类型的数据(属性)和代码(方法)。"
16321633
16331634#: ../../faq/programming.rst:1410
16341635msgid ""
@@ -1639,17 +1640,20 @@ msgid ""
16391640"for a mailbox, and subclasses such as ``MboxMailbox``, ``MaildirMailbox``, "
16401641"``OutlookMailbox`` that handle various specific mailbox formats."
16411642msgstr ""
1643+ "类可以基于一个或多个的其他类,称之为基类(ES),它继承基类的属性和方法,这样就可以通过继承来连续地细化对象模型。例如:您可能有一个 "
1644+ "``Mailbox`` 类提供邮箱的基本访问方法.,它的子类 ``MboxMailbox``, ``MaildirMailbox``, "
1645+ "``OutlookMailbox`` 用于处理各种特定邮箱格式。"
16421646
16431647#: ../../faq/programming.rst:1419
16441648msgid "What is a method?"
1645- msgstr ""
1649+ msgstr "什么是方法? "
16461650
16471651#: ../../faq/programming.rst:1421
16481652msgid ""
16491653"A method is a function on some object ``x`` that you normally call as "
16501654"``x.name(arguments...)``. Methods are defined as functions inside the class"
16511655" definition::"
1652- msgstr ""
1656+ msgstr "``方法`` 实际上就是类定义中的函数。对于某个对象 ``x`` 上的方法,通常称为 ``x.name(arguments...)`` 。 "
16531657
16541658#: ../../faq/programming.rst:1431
16551659msgid "What is self?"
@@ -1662,6 +1666,8 @@ msgid ""
16621666" c)`` for some instance ``x`` of the class in which the definition occurs; "
16631667"the called method will think it is called as ``meth(x, a, b, c)``."
16641668msgstr ""
1669+ "Self 只是 ``方法`` 的第一个参数的常规名称。例如:对于某个类的某个实例 ``x`` ,其方法 ``meth(self, a, b, c)`` "
1670+ "实际上应该被称为 ``x.meth(a, b, c)`` ;对于被调用的方法会被称为 ``meth(x, a, b, c)`` 。"
16651671
16661672#: ../../faq/programming.rst:1438
16671673msgid "See also :ref:`why-self`."
@@ -2180,7 +2186,7 @@ msgstr ""
21802186msgid ""
21812187"When I edit an imported module and reimport it, the changes don't show up. "
21822188"Why does this happen?"
2183- msgstr "当我编辑导入的模块并重新导入它时,更改不会显示 。为什么会这样?"
2189+ msgstr "当我编辑了导入过的模块并重新导入它时,这些变化没有显示出来 。为什么会这样?"
21842190
21852191#: ../../faq/programming.rst:1869
21862192msgid ""
0 commit comments