On this page
  1. inspect.Traceback
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

inspect.Traceback

Prev: inspect.Signature | Up: inspect
Rel: inspect.ArgInfo, inspect.Arguments, inspect.Attribute, inspect.BlockFinder
Ref: docs.python.org — inspect.Traceback
Tags: #public #python3 #stdlib #inspect


Import

import inspect
from inspect import Traceback

Signature & Overview

inspect.Traceback(filename, lineno, function, code_context, index, *, positions=None)

inspect.Traceback class.

Methods & Attributes

Usage

import inspect

tb = inspect.getframeinfo(inspect.currentframe())
assert isinstance(tb, inspect.Traceback) and tb.lineno > 0

Gotchas

REPL Inspect

from inspect import Traceback
help(Traceback)

Linked from

Related notes