[issue25832] Document weird behavior of `finally` when it has `break` in it

Josh Rosenberg report at bugs.python.org
Thu Dec 10 09:59:33 EST 2015


Josh Rosenberg added the comment:

You used explicit control flow keywords and you're surprised that it listened?

Regardless, this is already documented https://docs.python.org/3/reference/compound_stmts.html#finally :

"If the finally clause executes a return or break statement, the saved exception is discarded"

----------
nosy: +josh.r

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25832>
_______________________________________


More information about the Python-bugs-list mailing list