Can't figure out where SyntaxError: can not delete variable 'x' referenced in nested scope us coming from in python >=2.6

rdmurray at rdmurray at
Tue Dec 9 19:43:26 CET 2008

On Tue, 9 Dec 2008 at 13:11, Albert Hopkins wrote:
> Say I have module
>        def a(x):
>           def b():
>               x
>           del x
> The difference is under Python 2.4 I get a traceback with the lineno and
> offending line, but I do not get a traceback in Pythons 2.6 and 3.0.

2.5 also omits the traceback.  Smells like a bug to me.


More information about the Python-list mailing list