return from finally clause

Steve Holden sholden at holdenweb.com
Fri Jun 8 21:16:43 EDT 2001


"Joshua Marshall" <jmarshal at mathworks.com> wrote in message
news:9frdgk$pnd$1 at news.mathworks.com...
> "J?rgen Hermann" <jh at web.de> wrote:
>
> > That means that if you (accidently?) return within a finally clause, you
> > effectively eat the exception. This should be documented, or fixed.
>
> That's unpleasant.  I hope it's a bug.
>
Well, I think we  can agree that there's a certain inconsistency in
returning from a function with an exception active like that. So most of all
it's a programming error. What action would be best? Raise another exception
when the "return" is executed?

regards
 Steve






More information about the Python-list mailing list