PEP 765: Disallow return/break/continue that exit a finally block

I don’t have any problem with the evidence, it’s just the required action. Python has many millions of users and billions of lines of code - there’s rarely a percentage small enough to justify as “this won’t affect anyone”. So we should assume that people will be affected.

We know that compiler warnings have an outsized impact on users over maintainers, which is why DeprecationWarnings are off by default. So we should assume that primarily innocent users will be affected by a SyntaxWarning.

The approach that would convince me to support it is to create a new warning type and have it be off by default. But that wouldn’t actually convince me because there’s no way that’s worth the cost (which is a different reason), and I believe nobody else involved would prefer that way for the same reason.

But if there’s another approach that doesn’t bother users, that doesn’t bother maintainers who are using it correctly, and doesn’t bother anyone who chooses to suppress the bother, then I’m fine with it.

2 Likes