2011/2/26 Greg Ewing <greg.ew...@canterbury.ac.nz>:
> From: Grigory Javadyan
>> ... def f():
>> ...     a = 42
>> ...     def g():
>> ...             nonlocal a
>> ...             del a
>> ...
>> SyntaxError: can not delete variable 'a' referenced in nested scope
>
> Is there a rational for this? It seems inconsistent -- if you can
> assign to names in outer scopes, you should be able to del them
> as well.

Notice that it's now been changed...


-- 
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