88# eric R <[email protected] >, 201899# Meng Du <[email protected] >, 20191010# ppcfish <[email protected] >, 201911- # Dai Xu <[email protected] >, 20211211# Freesand Leo <[email protected] >, 202112+ # Dai Xu <[email protected] >, 20211313#
1414#, fuzzy
1515msgid ""
@@ -18,7 +18,7 @@ msgstr ""
1818"Report-Msgid-Bugs-To : \n "
1919"POT-Creation-Date : 2021-05-23 06:25+0000\n "
2020"PO-Revision-Date : 2017-02-16 17:43+0000\n "
21- "Last-Translator : Freesand Leo <yuqinju@163 .com>, 2021\n "
21+ "Last-Translator : Dai Xu <daixu61@hotmail .com>, 2021\n "
2222"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2323"MIME-Version : 1.0\n "
2424"Content-Type : text/plain; charset=UTF-8\n "
@@ -1740,7 +1740,9 @@ msgid ""
17401740"A method is a function on some object ``x`` that you normally call as "
17411741"``x.name(arguments...)``. Methods are defined as functions inside the class"
17421742" definition::"
1743- msgstr "``方法`` 实际上就是类定义中的函数。对于某个对象 ``x`` 上的方法,通常称为 ``x.name(arguments...)`` 。"
1743+ msgstr ""
1744+ "方法是属于对象的函数,对于对象 ``x`` ,通常以 ``x.name(arguments...)`` "
1745+ "的形式调用。方法以函数的形式给出定义,位于类的定义内:"
17441746
17451747#: ../../faq/programming.rst:1408
17461748msgid "What is self?"
@@ -1753,8 +1755,8 @@ msgid ""
17531755" c)`` for some instance ``x`` of the class in which the definition occurs; "
17541756"the called method will think it is called as ``meth(x, a, b, c)``."
17551757msgstr ""
1756- "Self 只是 ``方法`` 的第一个参数的常规名称。例如:对于某个类的某个实例 ``x`` ,其方法 `` meth(self, a, b, c)`` "
1757- "实际上应该被称为 ``x.meth(a, b, c)`` ;对于被调用的方法会被称为 ``meth(x, a, b, c)`` 。"
1758+ "Self 只是方法的第一个参数的习惯性名称。假定某个类中有个方法定义为 ``meth(self, a, b, c)`` ,则其实例 ``x`` 应以 "
1759+ "``x.meth(a, b, c)`` 的形式进行调用;而被调用的方法则应视其为做了 ``meth(x, a, b, c)`` 形式的调用 。"
17581760
17591761#: ../../faq/programming.rst:1415
17601762msgid "See also :ref:`why-self`."
@@ -1774,10 +1776,9 @@ msgid ""
17741776"and can also check whether an object is one of Python's built-in types, e.g."
17751777" ``isinstance(obj, str)`` or ``isinstance(obj, (int, float, complex))``."
17761778msgstr ""
1777- "可使用内置函数 ``isinstance(obj, cls)``。 你可以提供一个元组而不是单个类来检查某个对象是否为任意多个类当中某一个类的实例,例如"
1778- " ``isinstance(obj, (class1, class2, ...))``,也可以检查某个对象是否为 Python "
1779- "内置类型当中某一个类型的对象,例如 ``isinstance(obj, str)`` 或 ``isinstance(obj, (int, float, "
1780- "complex))``。"
1779+ "可使用内置函数 ``isinstance(obj, cls)``。可以检测对象是否属于多个类中某一个的实例,只要把单个类换成元组即可,比如 "
1780+ "``isinstance(obj, (class1, class2, ...))``,还可以检查对象是否属于某个 Python 内置类型,例如 "
1781+ "``isinstance(obj, str)`` 或 ``isinstance(obj, (int, float, complex))``。"
17811782
17821783#: ../../faq/programming.rst:1427
17831784msgid ""
@@ -1786,8 +1787,9 @@ msgid ""
17861787"registered class even if hasn't directly or indirectly inherited from it. "
17871788"To test for \" true inheritance\" , scan the :term:`MRO` of the class:"
17881789msgstr ""
1789- "请注意 :func:`isinstance` 还会检测派生自 :term:`abstract base class` 的虚拟继承。 "
1790- "因此,对于已注册的类此检测将返回 ``True`` 即使并未直接或间接地从它继承。 要检测“真继承”,请扫描类的 :term:`MRO`:"
1790+ "请注意 :func:`isinstance` 还会检测派生自 :term:`abstract base class` 的虚继承。 "
1791+ "因此对于已注册的类,即便没有直接或间接继承自抽象基类,对抽象基类的检测都将返回 ``True`` 。要想检测“真正的继承”,请扫描类的 "
1792+ ":term:`MRO` :"
17911793
17921794#: ../../faq/programming.rst:1462
17931795msgid ""
0 commit comments