[Python-3000] Draft PEP for outer scopes

Antoine solipsis at pitrou.net
Thu Nov 2 17:00:02 CET 2006


> OTOH, having `global` and `nonlocal` mean the same thing for
> module-bound variables violates TOOWTDI.

Then you can disallow "nonlocal" for anything else than closure variables.
And disallow "global" for anything else than module-global variables.
It is explicit and unambiguous, and reduces the probability of scoping bugs.




More information about the Python-3000 mailing list