traceback.format_tb()

traceback.format_tb(tb, limit=None)[source]

A shorthand for ‘format_list(extract_tb(tb, limit))’.