[Python-ideas] except expression

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Feb 17 23:45:04 CET 2014


> On Mon, Feb 17, 2014 at 08:52:41AM +1100, Chris Angelico wrote:
> 
>>Should the default clause have an inner scope in which the
>>name exists, shadowing anything of the same name elsewhere? Should it behave
>>the same way the statement try/except does, and unbind the name? 

We could sidestep the whole problem by not allowing
an 'as' clause at all. I don't think it would be
unreasonable to require the use of a try statement
if you want to do anything that fancy.

-- 
Greg


More information about the Python-ideas mailing list