[issue24187] del statement documentation doesn't mention name binding behaviour
Jon
report at bugs.python.org
Fri May 15 09:32:45 CEST 2015
Jon added the comment:
Sorry, I think I just misread this section. I was confused by the fact that del binds names like assignment does, so that the following tries to delete a local name and fails:
x = 1
def f():
del x
f()
In fact the documentation does say that there must be global statement in the block for del to delete a global name, so my bad.
----------
resolution: -> not a bug
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24187>
_______________________________________
More information about the Python-bugs-list
mailing list