@@ -142,6 +142,9 @@ msgid ""
142142"attributes of the exception) will be printed as well, like the interpreter "
143143"itself does when printing an unhandled exception."
144144msgstr ""
145+ "可选的 *limit* 参数的含义与 :func:`print_tb` 的相同。 如果 *chain* 为真值(默认),则链式异常(异常的 "
146+ ":attr:`~BaseException.__cause__` 或 :attr:`~BaseException.__context__` "
147+ "属性)也将被打印出来,就像解释器本身在打印未处理的异常时一样。"
145148
146149#: ../../library/traceback.rst:79 ../../library/traceback.rst:176
147150msgid "The *etype* argument is ignored and inferred from the type of *value*."
@@ -176,6 +179,9 @@ msgid ""
176179"objects>` to start. The optional *file* argument has the same meaning as "
177180"for :func:`print_tb`."
178181msgstr ""
182+ "如果 *limit* 为正数则打印至多 *limit* 个栈跟踪条目(从发起调用点开始)。 在其他情况下,则打印最后 ``abs(limit)`` "
183+ "个条目。 如果 *limit* 被省略或为 ``None``,则会打印所有条目。 可选的 *f* 参数可被用来指定一个替代 :ref:`栈帧 "
184+ "<frame-objects>` 作为开始位置。 可选的 *file* 参数的含义与 :func:`print_tb` 的相同。"
179185
180186#: ../../library/traceback.rst:116
181187msgid ""
@@ -189,6 +195,11 @@ msgid ""
189195":attr:`~FrameSummary.name`, and :attr:`~FrameSummary.line` representing the "
190196"information that is usually printed for a stack trace."
191197msgstr ""
198+ "返回一个 :class:`StackSummary` 对象来代表从 :ref:`回溯对象 <traceback-objects>` *tb* "
199+ "提取的“预处理”栈跟踪条目列表。 它可用作栈跟踪的另一种格式化形式。 可选的 *limit* 参数的含义与 :func:`print_tb` 的相同。 "
200+ "“预处理”栈跟踪条目是一个 :class:`FrameSummary` 对象,其中包含代表通常针对栈跟踪打印的信息的 "
201+ ":attr:`~FrameSummary.filename`, :attr:`~FrameSummary.lineno`, "
202+ ":attr:`~FrameSummary.name` 和 :attr:`~FrameSummary.line` 等属性。"
192203
193204#: ../../library/traceback.rst:129
194205msgid ""
@@ -197,6 +208,8 @@ msgid ""
197208" The optional *f* and *limit* arguments have the same meaning as for "
198209":func:`print_stack`."
199210msgstr ""
211+ "从当前的 :ref:`栈帧 <frame-objects>` 提取原始回溯。 返回值的格式与 :func:`extract_tb` 的相同。 可选的 "
212+ "*f* 和 *limit* 参数的含义与 :func:`print_stack` 的相同。"
200213
201214#: ../../library/traceback.rst:137
202215msgid ""
@@ -221,6 +234,10 @@ msgid ""
221234"about where the syntax error occurred. Following the message, the list "
222235"contains the exception's :attr:`notes <BaseException.__notes__>`."
223236msgstr ""
237+ "使用 :data:`sys.last_value` 等给出的异常值来格式化回溯的异常部分。 返回值是一个字符串列表,其中每一项都以换行符结束。 "
238+ "该列表包含异常消息,它通常是一个字符串;但是,对于 :exc:`SyntaxError` "
239+ "异常,它将包含多行并且(当打印时)会显示语法错误发生位置的详细信息。 在异常消息之后,该列表还包含了异常的 :attr:`注释 "
240+ "<BaseException.__notes__>`。"
224241
225242#: ../../library/traceback.rst:155
226243msgid ""
0 commit comments