@@ -1206,18 +1206,20 @@ msgid ""
12061206":exc:`MemoryError` and :exc:`RecursionError` depending on the malformed "
12071207"input."
12081208msgstr ""
1209+ "根据输入错误的具体形式它可能引发 :exc:`ValueError`, :exc:`TypeError`, :exc:`SyntaxError`, "
1210+ ":exc:`MemoryError` 以及 :exc:`RecursionError`。"
12091211
12101212#: ../../library/ast.rst:1981
12111213msgid "Now allows bytes and set literals."
12121214msgstr "目前支持字节和集合。"
12131215
12141216#: ../../library/ast.rst:1984
12151217msgid "Now supports creating empty sets with ``'set()'``."
1216- msgstr ""
1218+ msgstr "现在支持通过 ``'set()'`` 创建空集合。 "
12171219
12181220#: ../../library/ast.rst:1987
12191221msgid "For string inputs, leading spaces and tabs are now stripped."
1220- msgstr ""
1222+ msgstr "对于字符串输入,打头的空格和制表符现在会被去除。 "
12211223
12221224#: ../../library/ast.rst:1993
12231225msgid ""
@@ -1226,6 +1228,9 @@ msgid ""
12261228":class:`Module` node), or ``None`` if it has no docstring. If *clean* is "
12271229"true, clean up the docstring's indentation with :func:`inspect.cleandoc`."
12281230msgstr ""
1231+ "返回给定 *node* (必须为 :class:`FunctionDef`, :class:`AsyncFunctionDef`, "
1232+ ":class:`ClassDef` 或 :class:`Module` 节点) 的文档字符串,或者如果没有文档字符串则返回 ``None``。 如果 "
1233+ "*clean* 为真值,则通过 :func:`inspect.cleandoc` 清除文档字符串的缩进。"
12291234
12301235#: ../../library/ast.rst:1999
12311236msgid ":class:`AsyncFunctionDef` is now supported."
@@ -1237,12 +1242,15 @@ msgid ""
12371242"location information (:attr:`lineno`, :attr:`end_lineno`, "
12381243":attr:`col_offset`, or :attr:`end_col_offset`) is missing, return ``None``."
12391244msgstr ""
1245+ "获取生成 *node* 的 *source* 的源代码段。 如果丢失了某些位置信息 (:attr:`lineno`, "
1246+ ":attr:`end_lineno`, :attr:`col_offset` 或 :attr:`end_col_offset`),则返回 "
1247+ "``None``。"
12401248
12411249#: ../../library/ast.rst:2009
12421250msgid ""
12431251"If *padded* is ``True``, the first line of a multi-line statement will be "
12441252"padded with spaces to match its original position."
1245- msgstr ""
1253+ msgstr "如果 *padded* 为 ``True``,则多行语句的第一行将以与其初始位置相匹配的空格填充。 "
12461254
12471255#: ../../library/ast.rst:2017
12481256msgid ""
@@ -1253,26 +1261,33 @@ msgid ""
12531261"setting them to the values of the parent node. It works recursively "
12541262"starting at *node*."
12551263msgstr ""
1264+ "当你通过 :func:`compile` 来编译节点树时,编译器会准备接受每个支持 :attr:`lineno` 和 "
1265+ ":attr:`col_offset` 属性的节点的相应信息。 "
1266+ "对已生成节点来说这是相当繁琐的,因此这个辅助工具会递归地为尚未设置这些属性的节点添加它们,具体做法是将其设为父节点的对应值。 它将从 *node* "
1267+ "开始递归地执行。"
12561268
12571269#: ../../library/ast.rst:2026
12581270msgid ""
12591271"Increment the line number and end line number of each node in the tree "
12601272"starting at *node* by *n*. This is useful to \" move code\" to a different "
12611273"location in a file."
1262- msgstr ""
1274+ msgstr "从 *node* 开始按 *n* 递增节点树中每个节点的行号和结束行号。 这在“移动代码”到文件中的不同位置时很有用处。 "
12631275
12641276#: ../../library/ast.rst:2033
12651277msgid ""
12661278"Copy source location (:attr:`lineno`, :attr:`col_offset`, "
12671279":attr:`end_lineno`, and :attr:`end_col_offset`) from *old_node* to "
12681280"*new_node* if possible, and return *new_node*."
12691281msgstr ""
1282+ "在可能的情况下将源位置 (:attr:`lineno`, :attr:`col_offset`, :attr:`end_lineno` 和 "
1283+ ":attr:`end_col_offset`) 从 *old_node* 拷贝到 *new_node*,并返回 *new_node*。"
12701284
12711285#: ../../library/ast.rst:2040
12721286msgid ""
12731287"Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` "
12741288"that is present on *node*."
12751289msgstr ""
1290+ "针对于 *node* 上在 ``node._fields`` 中出现的每个字段产生一个 ``(fieldname, value)`` 元组。"
12761291
12771292#: ../../library/ast.rst:2046
12781293msgid ""
0 commit comments