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.

-- 
Greg

This email may be confidential and subject to legal privilege, it may
not reflect the views of the University of Canterbury, and it is not
guaranteed to be virus free. If you are not an intended recipient,
please notify the sender immediately and erase all copies of the message
and any attachments.

Please refer to http://www.canterbury.ac.nz/emaildisclaimer for more
information.
_______________________________________________
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