A litte bit more context.

PEP 601: "Forbid return/break/continue breaking out of finally"
https://www.python.org/dev/peps/pep-0601/

Abstract

This PEP proposes to forbid return, break and continue statements
within a finally suite where they would break out of the finally.
Their use in such a location silently cancels any active exception
being raised through the finally, leading to unclear code and possible
bugs.

Continue is currently not supported in a finally in Python 3.7 (due to
implementation issues) and the proposal is to not add support for it
in Python 3.8. For return and break the proposal is to deprecate their
use in Python 3.9, emit a compilation warning in Python 3.10 and then
forbid their use after that.

Victor
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/LVGOPXZ57XU3E5CAZDPLX47ETPIIDOZ3/

Reply via email to