(exc, /, value=_sentinel, tb=_sentinel, limit=None, \
                     chain=True)
return list(te.format(chain=chain))
Format a stack trace and the exception information.

    The arguments have the same meaning as the corresponding arguments
    to print_exception().  The return value is a list of strings, each
    ending in a newline and some containing internal newlines.  When
    these lines are concatenated and printed, exactly the same text is
    printed as does print_exception().
Format a stack trace and the exception information.
Format a stack trace and the exception information .
def format_exception(exc, /, value=_sentinel, tb=_sentinel, limit=None, \
                     chain=True):
    """Format a stack trace and the exception information.

    The arguments have the same meaning as the corresponding arguments
    to print_exception().  The return value is a list of strings, each
    ending in a newline and some containing internal newlines.  When
    these lines are concatenated and printed, exactly the same text is
    printed as does print_exception().
    """
    value, tb = _parse_value_tb(exc, value, tb)
    te = TracebackException(type(value), value, tb, limit=limit, compact=True)
    return list(te.format(chain=chain))
def format_exception ( exc , / , value = _sentinel , tb = _sentinel , limit = None , chain = True ) : value , tb = _parse_value_tb ( exc , value , tb ) te = TracebackException ( type ( value ) , value , tb , limit = limit , compact = True ) return list ( te . format ( chain = chain ) )