2011/2/26 Greg Ewing <[email protected]>: > 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 [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
