@@ -2827,13 +2827,13 @@ msgstr "元类的潜在作用非常广泛。已经过尝试的设想包括枚举
28272827
28282828#: ../../reference/datamodel.rst:2012
28292829msgid "Customizing instance and subclass checks"
2830- msgstr ""
2830+ msgstr "自定义实例及子类检查 "
28312831
28322832#: ../../reference/datamodel.rst:2014
28332833msgid ""
28342834"The following methods are used to override the default behavior of the "
28352835":func:`isinstance` and :func:`issubclass` built-in functions."
2836- msgstr ""
2836+ msgstr "以下方法被用来重载 :func:`isinstance` 和 :func:`issubclass` 内置函数的默认行为。 "
28372837
28382838#: ../../reference/datamodel.rst:2017
28392839msgid ""
@@ -2842,20 +2842,26 @@ msgid ""
28422842"base classes\" to any class or type (including built-in types), including "
28432843"other ABCs."
28442844msgstr ""
2845+ "特别地,元类 :class:`abc.ABCMeta` "
2846+ "实现了这些方法以便允许将抽象基类(ABC)作为“虚拟基类”添加到任何类或类型(包括内置类型),包括其他 ABC 之中。"
28452847
28462848#: ../../reference/datamodel.rst:2024
28472849msgid ""
28482850"Return true if *instance* should be considered a (direct or indirect) "
28492851"instance of *class*. If defined, called to implement ``isinstance(instance, "
28502852"class)``."
28512853msgstr ""
2854+ "如果 *instance* 应被视为 *class* 的一个(直接或间接)实例则返回真值。如果定义了此方法,则会被调用以实现 "
2855+ "``isinstance(instance, class)``。"
28522856
28532857#: ../../reference/datamodel.rst:2031
28542858msgid ""
28552859"Return true if *subclass* should be considered a (direct or indirect) "
28562860"subclass of *class*. If defined, called to implement ``issubclass(subclass,"
28572861" class)``."
28582862msgstr ""
2863+ "Return true 如果 *subclass* 应被视为 *class* 的一个(直接或间接)子类则返回真值。如果定义了此方法,则会被调用以实现 "
2864+ "``issubclass(subclass, class)``。"
28592865
28602866#: ../../reference/datamodel.rst:2036
28612867msgid ""
@@ -2864,10 +2870,11 @@ msgid ""
28642870"consistent with the lookup of special methods that are called on instances, "
28652871"only in this case the instance is itself a class."
28662872msgstr ""
2873+ "请注意这些方法的查找是基于类的类型(元类)。它们不能作为类方法在实际的类中被定义。这与基于实例被调用的特殊方法的查找是一致的,只有在此情况下实例本身被当作是类。"
28672874
28682875#: ../../reference/datamodel.rst:2047
28692876msgid ":pep:`3119` - Introducing Abstract Base Classes"
2870- msgstr ""
2877+ msgstr ":pep:`3119` - 引入抽象基类 "
28712878
28722879#: ../../reference/datamodel.rst:2044
28732880msgid ""
0 commit comments