Runtime Data Attributes
frame.f_back
Caller-side frame link, or None at the bottom of the stack. Holding frames may retain their local objects; avoid unnecessary long-lived references.
Formal Syntax & Structure
python syntaxpython
frame.f_backReturn Value
types.FrameType | None
Value exposed by this attribute; availability and mutability depend on the owner as described.
Working Example
Example Snippetpython
import inspectdef inner(): return inspect.currentframe().f_back.f_code.co_namedef outer(): return inner()print(outer())