
Terry J. Reedy <tjreedy@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@bugs.python.org> <https://bugs.python.org/issue26205> _______________________________________