classmethod extract(frame_gen, *, limit=None, lookup_lines=True, capture_locals=False)
Construct a StackSummary
object from a frame generator (such as is returned by walk_stack()
or walk_tb()
).
If limit is supplied, only this many frames are taken from frame_gen. If lookup_lines is False
, the returned FrameSummary
objects will not have read their lines in yet, making the cost of creating the StackSummary
cheaper (which may be valuable if it may not actually get formatted). If capture_locals is True
the local variables in each FrameSummary
are captured as object representations.
Please login to continue.