@@ -726,30 +726,30 @@ msgid ""
726726"The default :func:`dir` mechanism behaves differently with different types "
727727"of objects, as it attempts to produce the most relevant, rather than "
728728"complete, information:"
729- msgstr ""
729+ msgstr "默认的 :func:`dir` 机制对不同类型的对象行为不同,它会试图返回最相关而不是最全的信息: "
730730
731731#: ../../library/functions.rst:342
732732msgid ""
733733"If the object is a module object, the list contains the names of the "
734734"module's attributes."
735- msgstr ""
735+ msgstr "如果对象是模块对象,则列表包含模块的属性名称。 "
736736
737737#: ../../library/functions.rst:345
738738msgid ""
739739"If the object is a type or class object, the list contains the names of its "
740740"attributes, and recursively of the attributes of its bases."
741- msgstr ""
741+ msgstr "如果对象是类型或类对象,则列表包含它们的属性名称,并且递归查找所有基类的属性。 "
742742
743743#: ../../library/functions.rst:348
744744msgid ""
745745"Otherwise, the list contains the object's attributes' names, the names of "
746746"its class's attributes, and recursively of the attributes of its class's "
747747"base classes."
748- msgstr ""
748+ msgstr "否则,列表包含对象的属性名称,它的类属性名称,并且递归查找它的类的所有基类的属性。 "
749749
750750#: ../../library/functions.rst:352
751751msgid "The resulting list is sorted alphabetically. For example:"
752- msgstr ""
752+ msgstr "返回的列表按字母表排序。例如: "
753753
754754#: ../../library/functions.rst:371
755755msgid ""
@@ -759,6 +759,9 @@ msgid ""
759759"its detailed behavior may change across releases. For example, metaclass "
760760"attributes are not in the result list when the argument is a class."
761761msgstr ""
762+ "因为 :func:`dir` "
763+ "主要是为了便于在交互式时使用,所以它会试图返回人们感兴趣的名字集合,而不是试图保证结果的严格性或一致性,它具体的行为也可能在不同版本之间改变。例如,当参数是一个类时,metaclass"
764+ " 的属性不包含在结果列表中。"
762765
763766#: ../../library/functions.rst:381
764767msgid ""
@@ -771,6 +774,10 @@ msgid ""
771774"% b`` is very close to *a*, if ``a % b`` is non-zero it has the same sign as"
772775" *b*, and ``0 <= abs(a % b) < abs(b)``."
773776msgstr ""
777+ "它将两个(非复数)数字作为参数,并在执行整数除法时返回一对商和余数。对于混合操作数类型,适用双目算术运算符的规则。对于整数,结果和 ``(a // b,"
778+ " a % b)`` 一致。对于浮点数,结果是 ``(q, a % b)`` ,*q* 通常是 ``math.floor(a / b)`` 但可能会比 1"
779+ " 小。在任何情况下, ``q * b + a % b`` 和 *a* 基本相等;如果 ``a % b`` 非零,它的符号和 *b* 一样,并且 ``0"
780+ " <= abs(a % b) < abs(b)`` 。"
774781
775782#: ../../library/functions.rst:393
776783msgid ""
@@ -780,6 +787,9 @@ msgid ""
780787":func:`enumerate` returns a tuple containing a count (from *start* which "
781788"defaults to 0) and the values obtained from iterating over *iterable*."
782789msgstr ""
790+ "返回一个枚举对象。*iterable* 必须是一个序列,或 :term:`迭代器`,或其他支持迭代的对象。 :func:`enumerate` "
791+ "返回的迭代器的 :meth:`~iterator.__next__` 方法返回一个元组,里面包含一个计数值(从 *start* 开始,默认为 "
792+ "0)和通过迭代 *iterable* 获得的值。"
783793
784794#: ../../library/functions.rst:405
785795msgid "Equivalent to::"
0 commit comments