Message248042
I wonder if it is a left-over from the behaviour prior to 3.2? In 3.1, I
get this syntax error:
py> def outer():
... spam = 1
... def inner():
... nonlocal spam
... del spam
... inner()
...
SyntaxError: can not delete variable 'spam' referenced in nested scope
See also the "Changed in 3.2" comment here:
https://docs.python.org/3/reference/simple_stmts.html#the-del-statement |
|
Date |
User |
Action |
Args |
2015-08-05 14:48:57 | steven.daprano | set | recipients:
+ steven.daprano, ncoghlan, docs@python |
2015-08-05 14:48:55 | steven.daprano | set | messageid: <1438786135.13.0.789014098533.issue24796@psf.upfronthosting.co.za> |
2015-08-05 14:48:54 | steven.daprano | link | issue24796 messages |
2015-08-05 14:48:49 | steven.daprano | create | |
|