This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients amaury.forgeotdarc, benjamin.peterson, cmcqueen1975, gvanrossum, jhylton, pje, rhettinger, terry.reedy
Date 2010-02-22.23:10:52
SpamBayes Score 3.090511e-06
Marked as misclassified No
Message-id <1266880254.52.0.863061255282.issue4617@psf.upfronthosting.co.za>
In-reply-to
Content
All examples so far (*) have to do with our inability to have properly nested blocks. If we did, I'd make the except clause a block, and I'd issue a syntax warning or error if a nested block shadowed a variable referenced outside it. Ditto for generator expressions and comprehensions.

As long as we don't have nested blocks, I think it's okay to see the limitation on (implicit or explicit) "del" of a cell variable as a compiler deficiency and fix that deficiency.

__________
(*) However there's also this example:

>>> def f():
...  try: 1/0
...  except Exception as a:
...   def g(): return a
...   return g
... 
SyntaxError: can not delete variable 'a' referenced in nested scope
>>>
History
Date User Action Args
2010-02-22 23:10:54gvanrossumsetrecipients: + gvanrossum, jhylton, rhettinger, terry.reedy, pje, amaury.forgeotdarc, benjamin.peterson, cmcqueen1975
2010-02-22 23:10:54gvanrossumsetmessageid: <1266880254.52.0.863061255282.issue4617@psf.upfronthosting.co.za>
2010-02-22 23:10:52gvanrossumlinkissue4617 messages
2010-02-22 23:10:52gvanrossumcreate