It's an interesting bug. Maybe the compiler shouldn't allow you to use such a variable as a free variable in a nested function?
On Thu, Feb 11, 2010 at 9:09 PM, Craig McQueen <rep...@bugs.python.org> wrote: > > Craig McQueen <pyt...@craig.mcqueen.id.au> added the comment: > > There's also this one which caught me out: > > def outer(): > x = 0 > y = (x for i in range(10)) > del x # SyntaxError > > ---------- > nosy: +cmcqueen1975 > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <http://bugs.python.org/issue4617> > _______________________________________ > _______________________________________________ > Python-bugs-list mailing list > Unsubscribe: > http://mail.python.org/mailman/options/python-bugs-list/jeremy%40alum.mit.edu > > _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com