https://pythontutor.com/render.html#mode=display This is a tool used for debugging python code.
Frames
These represent scope.
Global Scope
The global scope holds global variables and methods, Each function scope may also have global variables and methods
Function Scope
Contains all:
- parameters
- new variables in scope
- the return value
Objects
Functions
When a function is defined, it is stored in the global frame and then the function header is saved in an ID
Variables
These Ids are stored directly with the value of the variable.