summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGuido van Rossum <guido@dropbox.com>2016-09-09 16:36:26 (GMT)
committerGuido van Rossum <guido@dropbox.com>2016-09-09 16:36:26 (GMT)
commit6cff8744a0ae58c88728df8bbca4580ffa6c6a86 (patch)
tree8cd1a3c28fdc74e6f432661661f306e9feb2bc6d /Doc
parent95e502e7a664c588bcd9d895af285a32ce8246fe (diff)
downloadcpython-6cff8744a0ae58c88728df8bbca4580ffa6c6a86.zip
cpython-6cff8744a0ae58c88728df8bbca4580ffa6c6a86.tar.gz
cpython-6cff8744a0ae58c88728df8bbca4580ffa6c6a86.tar.bz2
Issue #27999: Make "global after use" a SyntaxError, and ditto for nonlocal.
Patch by Ivan Levkivskyi.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/reference/simple_stmts.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst
index 1973272..6aafa72 100644
--- a/Doc/reference/simple_stmts.rst
+++ b/Doc/reference/simple_stmts.rst
@@ -903,11 +903,12 @@ block textually preceding that :keyword:`global` statement.
Names listed in a :keyword:`global` statement must not be defined as formal
parameters or in a :keyword:`for` loop control target, :keyword:`class`
-definition, function definition, or :keyword:`import` statement.
+definition, function definition, :keyword:`import` statement, or variable
+annotation.
.. impl-detail::
- The current implementation does not enforce the two restrictions, but
+ The current implementation does not enforce some of these restriction, but
programs should not abuse this freedom, as future implementations may enforce
them or silently change the meaning of the program.