PEP 601: Forbid return/break/continue breaking out of finally

I have made PRs to update PEP 601 and PEP 8, see https://github.com/python/peps/pull/1173 and https://github.com/python/peps/pull/1174 respectively.

2 Likes

Thanks, I approved and merged both.

(OT: There’s never a need to squash commits, we do that when we press the “Squash and Merge” button on GitHub. Squashing is actually counterproductive for the review, as is force-pushing amended commits – it can confuse the reviewer.)

3 Likes

I’ve said something along the same lines a few times in PRs when the authors have asked if they should squash their commits, but it’s useful to know the official stance. Thanks for mentioning it.

FWIW, I’ve now fixed continue within a finally in MicroPython, see https://github.com/micropython/micropython/pull/5154

2 Likes