[Python-Dev] What this code should do?

Michael Foord fuzzyman at voidspace.org.uk
Fri Sep 19 18:05:01 CEST 2008


Maciej Fijalkowski wrote:
> Hello,
>
> I'm a little clueless about exact semantics of following snippets:
>
> http://paste.pocoo.org/show/85698/
>
> is this fine?
>   

It looks right to me. :-)

In the first case the NameError is caught by the except and not 
re-raised (but still enters the finally after the except block) and in 
the second the NameError is caught by the finally that does re-raise.

What do you think should happen?

Michael

> or shall I fill the bug?
> (the reason to ask is because a) django is relying on this b) pypy
> implements it differently)
>
> cheers,
> fijal
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk
>   


-- 
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/
http://www.trypython.org/
http://www.ironpython.info/
http://www.resolverhacks.net/
http://www.theotherdelia.co.uk/



More information about the Python-Dev mailing list