Runtime Types
types.TracebackType — runtime type
A traceback records the frames and instruction locations associated with exception propagation. Inspect tb_frame, tb_lineno and tb_next; traceback chains differ from the live call stack. The documented constructor accepts next traceback, frame, instruction index and line number. Avoid retaining tracebacks with sensitive locals.
Formal Syntax & Structure
python syntaxpython
types.TracebackTypeReturn Value
type
The class object types.TracebackType; this reference documents the class identity, not a universal constructor signature.
Working Example
Example Snippetpython
import typestry: int("bad")except ValueError as error: trace=error.__traceback__value = traceprint(isinstance(value, types.TracebackType))