[issue26205] Better specify number of nested scopes

Terry J. Reedy report at bugs.python.org
Mon Jul 6 06:03:00 EDT 2020


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Besides the sentence now revised, the initial post referenced confusion with 'middle scope' in "If a name is declared global, then all references and assignments go directly to the middle scope containing the module's global names."

This has not been directly discussed that I could find, but it seems inappropriate both at toplevel, where globals = locals, and in nested functions, where nonlocals are also 'middle'.  Maybe replace "the middle scope containing the module's global names" with "the module's global namespace".  The rest of this paragraph and the next could be reviewed.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26205>
_______________________________________


More information about the Python-bugs-list mailing list