Open
Description
In this issue I want to try and improve the interface between the compiler and the symtable.
Problems I see are:
- the compiler modifies the symtable
- the compiler performs calculations that the symtable could do (such as in
push_inlined_comprehension_state
) - the symtable is actually not a correct representation of some scopes, like those of inlined comprehensions (the comprehension scope it removed from the symtable tree, but is still access from the compiler via the symtable dict). Exception handlers are another example of scope changes that the compiler does, which are not reflected in the symtable.