Python's globals - Noetic Nought
TL; DR
The global statement is a parser directive to indicate that globals are
being used. When looking up globals, the globals of the current scope are
fetched.
Python’s globals are really just module-level.
Every function has an associated __globals__ dictionary, which is the same
as the module’s __dict__ for the module where it was defined. This
__globals__ dict is the name-space that is looked up when trying to fetch
globals within a function.
punchagan.muse-amuse.in