File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- {"translation" : " 90.24%" , "updated_at" : " 2023-08-30T12:59:49Z " }
1+ {"translation" : " 90.24%" , "updated_at" : " 2023-08-30T23:56:48Z " }
Original file line number Diff line number Diff line change @@ -402,6 +402,9 @@ msgid ""
402402"here to the class name given in the class definition header "
403403"(:class:`!ClassName` in the example)."
404404msgstr ""
405+ "当 (从结尾处) 正常离开类定义时,将创建一个 *类对象*。 "
406+ "这基本上是一个围绕类定义所创建的命名空间的包装器;我们将在下一节中了解有关类对象的更多信息。 原始的 (在进入类定义之前有效的) "
407+ "作用域将重新生效,类对象将在这里与类定义头所给出的类名称进行绑定 (在这个示例中为 :class:`!ClassName`)。"
405408
406409#: ../../tutorial/classes.rst:259
407410msgid "Class Objects"
@@ -455,6 +458,8 @@ msgid ""
455458"specific initial state. Therefore a class may define a special method named "
456459":meth:`~object.__init__`, like this::"
457460msgstr ""
461+ "实例化操作 (“调用”类对象) 会创建一个空对象。 许多类都希望创建的对象实例是根据特定初始状态定制的。 因此一个类可能会定义名为 "
462+ ":meth:`~object.__init__` 的特殊方法,就像这样::"
458463
459464#: ../../tutorial/classes.rst:299
460465msgid ""
@@ -463,6 +468,8 @@ msgid ""
463468"instance. So in this example, a new, initialized instance can be obtained "
464469"by::"
465470msgstr ""
471+ "当一个类定义了 :meth:`~object.__init__` 方法时,类的实例化会自动为新创建的类实例发起调用 :meth:`!__init__`。"
472+ " 因此在这个例子中,可以通过以下语句获得一个已初始化的新实例::"
466473
467474#: ../../tutorial/classes.rst:305
468475msgid ""
You can’t perform that action at this time.
0 commit comments