Name
_getframe
Synopsis
_getframe(depth
=0)
Returns a frame object from the call stack. When
depth
is 0
, the result
is the frame of _getframe
’s
caller. When depth
is
1
, the result is the frame of the
caller’s caller, and so forth. The leading
_
in
_getframe
’s name is a reminder
that it’s a private system function, to be used for
internal specialized purposes. Chapter 17 covers
ways in which you can use frame objects for debugging.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.