[docs] [issue14167] document return statement in finally blocks

Mark Dickinson report at bugs.python.org
Mon Sep 24 20:45:23 CEST 2012

Mark Dickinson added the comment:

I think something went wrong with this doc change.  The docs used to say:

If the :keyword:`finally` clause raises another exception or executes a :keyword:`return` or :keyword:`break` statement, the saved exception is lost.

Now we have:

If there is a saved exception or :keyword:`break` statement, it is re-raised at the end of the :keyword:`finally` clause.

which doesn't make much sense (what does 'it' refer to in the case of a 'break' statement), and we seem to have lost the explicit statement that a 'break' in a finally cause swallows exceptions.

nosy: +mark.dickinson

Python tracker <report at bugs.python.org>

More information about the docs mailing list