File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -593,13 +593,17 @@ msgid ""
593593":meth:`__init__` method that has to be called, it is common to call this "
594594"method in a :meth:`__post_init__` method::"
595595msgstr ""
596+ "由 :func:`dataclass` 所生成的 :meth:`__init__` 方法不会调用基类的 :meth:`__init__` 方法。 "
597+ "如果基类有需要被调用的 :meth:`__init__` 方法,通常是在 :meth:`__post_init__` 方法中调用此方法::"
596598
597599#: ../../library/dataclasses.rst:442
598600msgid ""
599601"Note, however, that in general the dataclass-generated :meth:`__init__` "
600602"methods don't need to be called, since the derived dataclass will take care "
601603"of initializing all fields of any base class that is a dataclass itself."
602604msgstr ""
605+ "但是请注意,一般来说 dataclass 生成的 :meth:`__init__` 方法不需要被调用,因为派生的 dataclass "
606+ "将负责初始化任何自身为 dataclass 的基类的所有字段。"
603607
604608#: ../../library/dataclasses.rst:446
605609msgid ""
Original file line number Diff line number Diff line change @@ -1164,12 +1164,17 @@ msgid ""
11641164"Pass ``''`` as prefix to move all unprefixed tag names in the expression "
11651165"into the given namespace."
11661166msgstr ""
1167+ "查找第一个匹配 *match* 的子元素的文本。 *match* 可以是一个标记名称或者 :ref:`路径 <elementtree-xpath>`。 "
1168+ "反回第一个匹配的元素的文本内容,或者如果元素未找到则返回 *default*。 请注意如果匹配的元素没有文本内容则会返回一个空字符串。 "
1169+ "*namespaces* 是可选的从命名空间前缀到完整名称的映射。 传入 ``''`` 作为前缀可将表达式中所有无前缀的标记名称移动到给定的命名空间。"
11671170
11681171#: ../../library/xml.etree.elementtree.rst:984
11691172msgid ""
11701173"Inserts *subelement* at the given position in this element. Raises "
11711174":exc:`TypeError` if *subelement* is not an :class:`Element`."
11721175msgstr ""
1176+ "将 *subelement* 插入到此元素的给定位置中。 如果 *subelement* 不是一个 :class:`Element` 则会引发 "
1177+ ":exc:`TypeError`。"
11731178
11741179#: ../../library/xml.etree.elementtree.rst:990
11751180msgid ""
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ msgid ""
3636"the SAX exceptions and the convenience functions which will be most used by "
3737"users of the SAX API."
3838msgstr ""
39+ ":mod:`xml.sax` 包提供多个模块,它们在 Python 上实现了用于 XML (SAX) 接口的简单 API。 这个包本身为 SAX "
40+ "API 用户提供了一些最常用的 SAX 异常和便捷函数。"
3941
4042#: ../../library/xml.sax.rst:23
4143msgid ""
You can’t perform that action at this time.
0 commit comments