locals+stack, dynamically sized
previous frame, or NULL
for try and loop blocks
builtin symbol table (PyDictObject)
code segment
_
If an exception is raised in this frame, the next three are used to record the exception info (if any) originally in the thread state. See comments before set_exc_info() -- it's not obvious. Invariant: if _type is NULL, then so are _value and _traceback. Desired invariant: all three are NULL, or all three are non-NULL. That one isn't currently true, but "should be".
_
_
global symbol table (PyDictObject)
index in f_blockstack
Last instruction if called
Call PyFrame_GetLineNumber() instead of reading this field directly. As of 2.3 f_lineno is only valid when tracing is active (i.e. when f_trace is set). At other times we use PyCode_Addr2Line to calculate the line from the current bytecode index.
local symbol table (any mapping)
Availability: 2.4
Availability: 2.4
Availability: 2.4
Next free slot in f_valuestack. Frame creation sets to f_valuestack. Frame evaluation usually NULLs it, but a frame that yields sets it to the current stack top.
Trace function
Availability >= 3.7
Availability >= 3.7
_
points after the last local
_
subclass of PyVarObject