MCPcopy Index your code
hub / github.com/python/cpython / trace

Function trace

Lib/inspect.py:1687–1691  ·  view source on GitHub ↗

Return a list of records for the stack below the current exception.

(context=1)

Source from the content-addressed store, hash-verified

1685 return getouterframes(sys._getframe(1), context)
1686
1687def trace(context=1):
1688 """Return a list of records for the stack below the current exception."""
1689 exc = sys.exception()
1690 tb = None if exc is None else exc.__traceback__
1691 return getinnerframes(tb, context)
1692
1693
1694# ------------------------------------------------ static version of getattr

Callers

nothing calls this directly

Calls 2

getinnerframesFunction · 0.85
exceptionMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…