2011/2/26 Grigory Javadyan <grigory.javad...@gmail.com>:
>>>> def f():
> ...     a = 42
> ...     def g():
> ...             nonlocal a
> ...             del a
> ...
> SyntaxError: can not delete variable 'a' referenced in nested scope
>
> Which looks weird, because the name is referenced in the _enclosed_
> scope, not the _enclosing_ scope. Is there a typo in the documentation
> or am I missing something?

Actually you can do that now 3.2+. I've now removed that sentence;.



-- 
Regards,
Benjamin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to