3 ms·
Variables are lexically scoped. Additionally, to _assign_ to an outer/global variable, one needs to use the nonlocal/global keyword. Otherwise one will get a ne
by jononor 2y ago
Variables are lexically scoped. Additionally, to _assign_ to an outer/global variable, one needs to use the nonlocal/global keyword. Otherwise one will get a new local variable. Variables in a module are also namespaced to that module.
So I have no idea what the "everything is global" scope is about.