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 same inde
(extracted_list)
| 44 | print(item, file=file, end="") |
| 45 | |
| 46 | def format_list(extracted_list): |
| 47 | """Format a list of tuples or FrameSummary objects for printing. |
| 48 | |
| 49 | Given a list of tuples or FrameSummary objects as returned by |
| 50 | extract_tb() or extract_stack(), return a list of strings ready |
| 51 | for printing. |
| 52 | |
| 53 | Each string in the resulting list corresponds to the item with the |
| 54 | same index in the argument list. Each string ends in a newline; |
| 55 | the strings may contain internal newlines as well, for those items |
| 56 | whose source text line is not None. |
| 57 | """ |
| 58 | return StackSummary.from_list(extracted_list).format() |
| 59 | |
| 60 | # |
| 61 | # Printing and Extracting Tracebacks. |
no test coverage detected
searching dependent graphs…