PyDocs

Nav

Python Runtime Services

walk_stack

traceback

function · Added in 3.5 (source)
  • walk_stack(f)
Walk a stack yielding the frame and line number for each frame.

This will follow f.f_back from the given frame. If no frame is given, the
current stack is used. Usually used with StackSummary.extract.
Changed in 3.14
  • 3.14: This function previously returned a generator that would walk the stack when first iterated over. The generator returned now is the state of the stack when walk_stack is called.
0 Examples
No examples for traceback/walk_stack.
See Also
No see-alsos for traceback/walk_stack
0 Notes
No notes for walk_stack