]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-34939: Allow annotated global names in module namespace (GH-9844)
authorPablo Galindo <Pablogsal@gmail.com>
Sun, 14 Oct 2018 17:01:03 +0000 (18:01 +0100)
committerGitHub <noreply@github.com>
Sun, 14 Oct 2018 17:01:03 +0000 (18:01 +0100)
commitde2aea0ff02fa9486365ce9d215bef150fae3a0b
tree83406b50dd7d3f85272bba218927d3ea0f005269
parentbd036d3d15fc1310ccc32a43a3296b8c157ac221
bpo-34939: Allow annotated global names in module namespace (GH-9844)

Allow annotated global names in the module namespace after the symbol is
declared as global. Previously, only symbols annotated before they are declared
as global (i.e. inside a function) were allowed. This change allows symbols to be
declared as global before the annotation happens in the global scope.
Lib/test/test_symtable.py
Misc/NEWS.d/next/Core and Builtins/2018-10-13-17-40-15.bpo-34939.0gpxlJ.rst [new file with mode: 0644]
Python/symtable.c