@@ -850,39 +850,44 @@ msgid ""
850850"starargs will be expanded to join the list of base classes, and kwargs will "
851851"be passed to the metaclass."
852852msgstr ""
853+ "``starargs`` 和 ``kwargs`` 各为一个单独的节点,与在函数调用中的一致。 starargs 将被展开加入到基类的列表中,而 "
854+ "kwargs 将被传给元类。"
853855
854856#: ../../library/ast.rst:1434
855857msgid ""
856858"``body`` is a list of nodes representing the code within the class "
857859"definition."
858- msgstr ""
860+ msgstr "``body`` 是一个由代表类定义内部代码的节点组成的列表。 "
859861
860862#: ../../library/ast.rst:1436
861863msgid "``decorator_list`` is a list of nodes, as in :class:`FunctionDef`."
862- msgstr ""
864+ msgstr "``decorator_list`` 是一个节点的列表,与 :class:`FunctionDef` 中的一致。 "
863865
864866#: ../../library/ast.rst:1465
865867msgid "Async and await"
866- msgstr ""
868+ msgstr "async 与 await "
867869
868870#: ../../library/ast.rst:1469
869871msgid ""
870872"An ``async def`` function definition. Has the same fields as "
871873":class:`FunctionDef`."
872- msgstr ""
874+ msgstr "一个 ``async def`` 函数定义。 具有与 :class:`FunctionDef` 相同的字段。 "
873875
874876#: ../../library/ast.rst:1475
875877msgid ""
876878"An ``await`` expression. ``value`` is what it waits for. Only valid in the "
877879"body of an :class:`AsyncFunctionDef`."
878880msgstr ""
881+ "一个 ``await`` 表达式。 ``value`` 是它所等待的值。 仅在 :class:`AsyncFunctionDef` 的函数体内可用。"
879882
880883#: ../../library/ast.rst:1508
881884msgid ""
882885"``async for`` loops and ``async with`` context managers. They have the same "
883886"fields as :class:`For` and :class:`With`, respectively. Only valid in the "
884887"body of an :class:`AsyncFunctionDef`."
885888msgstr ""
889+ "``async for`` 循环和 ``async with`` 上下文管理器。 它们分别具有与 :class:`For` 和 "
890+ ":class:`With` 相同的字段。 仅在 :class:`AsyncFunctionDef` 的函数体内可用。"
886891
887892#: ../../library/ast.rst:1513
888893msgid ""
@@ -892,6 +897,10 @@ msgid ""
892897" be singletons. Changes to one will be reflected in all other occurrences of"
893898" the same value (e.g. :class:`ast.Add`)."
894899msgstr ""
900+ "当一个字符串由 :func:`ast.parse` 来解析时,所返回的树中的运算符节点 (为 :class:`ast.operator`, "
901+ ":class:`ast.unaryop`, :class:`ast.cmpop`, :class:`ast.boolop` 和 "
902+ ":class:`ast.expr_context` 的子类) 将均为单例对象。 对其中某一个 (例如 :class:`ast.Add`) "
903+ "的修改将反映到同一个值所出现的其他位置上。"
895904
896905#: ../../library/ast.rst:1521
897906msgid ":mod:`ast` Helpers"
@@ -922,13 +931,20 @@ msgid ""
922931"the ``type_ignores`` attribute of :class:`Module` (otherwise it is always an"
923932" empty list)."
924933msgstr ""
934+ "如果给出 ``type_comments=True``,解析器会被修改以检查并返回 :pep:`484` 和 :pep:`526` 所描述的类型注释。 "
935+ "这相当于将 :data:`ast.PyCF_TYPE_COMMENTS` 添加到传给 :func:`compile()` 的旗标中。 "
936+ "这将报告针对未在正确放置类型注释的语法错误。 没有这个旗标,类型注释将被忽略,而指定 AST 节点上的 ``type_comment`` 字段将总是为"
937+ " ``None``。 此外,``# type: ignore`` 注释的位置将作为 :class:`Module` 的 ``type_ignores``"
938+ " 属性被返回(在其他情况下则总是为空列表)。"
925939
926940#: ../../library/ast.rst:1541
927941msgid ""
928942"In addition, if ``mode`` is ``'func_type'``, the input syntax is modified to"
929943" correspond to :pep:`484` \" signature type comments\" , e.g. ``(str, int) -> "
930944"List[str]``."
931945msgstr ""
946+ "并且,如果 ``mode`` 为 ``'func_type'``,则输入语法会进行与 :pep:`484` \" 签名类型注释\" 对应的修改,例如 "
947+ "``(str, int) -> List[str]``。"
932948
933949#: ../../library/ast.rst:1545
934950msgid ""
0 commit comments