MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / format_list

Function format_list

tools/python-3.11.9-amd64/Lib/traceback.py:29–41  ·  view source on GitHub ↗

Format a list of tuples or FrameSummary objects for printing. Given a list of tuples or FrameSummary objects as returned by extract_tb() or extract_stack(), return a list of strings ready for printing. Each string in the resulting list corresponds to the item with the sa

(extracted_list)

Source from the content-addressed store, hash-verified

27 print(item, file=file, end="")
28
29def format_list(extracted_list):
30 """Format a list of tuples or FrameSummary objects for printing.
31
32 Given a list of tuples or FrameSummary objects as returned by
33 extract_tb() or extract_stack(), return a list of strings ready
34 for printing.
35
36 Each string in the resulting list corresponds to the item with the
37 same index in the argument list. Each string ends in a newline;
38 the strings may contain internal newlines as well, for those items
39 whose source text line is not None.
40 """
41 return StackSummary.from_list(extracted_list).format()
42
43#
44# Printing and Extracting Tracebacks.

Callers 1

format_stackFunction · 0.85

Calls 2

from_listMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected