[docs] [issue24796] Deleting names referencing from enclosed and enclosing scopes
Ivan Levkivskyi
report at bugs.python.org
Sat Mar 18 09:39:06 EDT 2017
Ivan Levkivskyi added the comment:
It looks like it is safe to just remove this line from docs. This code
>>> x = 1
>>> def f():
... global x
... del x
...
>>> f()
>>> x
Works as expected, i.e. raises NameError. (The same happens for nonlocal but with UnboundLocalError.)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24796>
_______________________________________
More information about the docs
mailing list