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 r.david.murray
Recipients barry, ezio.melotti, ncoghlan, r.david.murray
Date 2013-04-19.01:33:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1366335185.17.0.975615280276.issue17792@psf.upfronthosting.co.za>
In-reply-to
Content
It occurs to me that one of the problems here is that the UnboundLocalError only occurs when the except clause is executed.  Do you think it would be helpful and acceptable (in 3.4, as it is a behavior change) to have the 'as' variable *always* deleted at the end of the try/except block?  Then you would always get the UnboundLocalError, instead of it mysteriously appearing only when the except was executed.  

Granted it is a bit weird, but then so is the variable getting deleted in the first place.
History
Date User Action Args
2013-04-19 01:33:05r.david.murraysetrecipients: + r.david.murray, barry, ncoghlan, ezio.melotti
2013-04-19 01:33:05r.david.murraysetmessageid: <1366335185.17.0.975615280276.issue17792@psf.upfronthosting.co.za>
2013-04-19 01:33:05r.david.murraylinkissue17792 messages
2013-04-19 01:33:04r.david.murraycreate