ID EN
Sys

_getframe

Python 3.11

Return a frame object from the call stack. If optional integer depth is given, return the frame object that many calls below the top of the stack. If that is deeper than the call stack, ValueError is raised. The default for depth is zero, returning the frame at the top of the call stack.

Syntax

PYTHON
sys._getframe([depth])

See Also

ValueError auditing event