parameters: (etype, value, tb, limit=None, file=None, chain=True)
docstring: Print exception up to 'limit' stack trace entries from 'tb' to 'file'.
  
      This differs from print_tb() in the following ways: (1) if
      traceback is not None, it prints a header "Traceback (most recent
      call last):"; (2) it prints the exception type and value after the
      stack trace; (3) if type is SyntaxError and value has the
      appropriate format, it prints the line where the syntax error
      occurred with a caret on the next line indicating the approximate
      position of the error.
docstring_summary: Print exception up to 'limit' stack trace entries from 'tb' to 'file'.
docstring_tokens: Print exception up to limit stack trace entries from tb to file .
function: def print_exception(etype, value, tb, limit=None, file=None, chain=True):
      """Print exception up to 'limit' stack trace entries from 'tb' to 'file'.
  
      This differs from print_tb() in the following ways: (1) if
      traceback is not None, it prints a header "Traceback (most recent
      call last):"; (2) it prints the exception type and value after the
      stack trace; (3) if type is SyntaxError and value has the
      appropriate format, it prints the line where the syntax error
      occurred with a caret on the next line indicating the approximate
      position of the error.
      """
      # format_exception has ignored etype for some time, and code such as cgitb
      # passes in bogus values as a result. For compatibility with such code we
      # ignore it here (rather than in the new TracebackException API).
      if file is None:
          file = sys.stderr
      for line in TracebackException(
              type(value), value, tb, limit=limit).format(chain=chain):
          print(line, file=file, end="")
function_tokens: def print_exception ( etype , value , tb , limit = None , file = None , chain = True ) : # format_exception has ignored etype for some time, and code such as cgitb # passes in bogus values as a result. For compatibility with such code we # ignore it here (rather than in the new TracebackException API). if file is None : file = sys . stderr for line in TracebackException ( type ( value ) , value , tb , limit = limit ) . format ( chain = chain ) : print ( line , file = file , end = "" )