forked from python/peps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0450fe4
commit 8971a6f
Showing
2 changed files
with
7 additions
and
6 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
PEP: 9999 | ||
PEP: 765 | ||
Title: Disallow return/break/continue that exit a finally block | ||
Author: Irit Katriel <[email protected]>, Alyssa Coghlan <[email protected]> | ||
Discussions-To: https://discuss.python.org/t/an-analysis-of-return-in-finally-in-the-wild/70633 | ||
|
@@ -50,15 +50,15 @@ and flake8-bugbear [4]_ flag them as a problem. | |
Rationale | ||
========= | ||
|
||
A recent analysis of real world code [5]_ shows that:: | ||
A recent analysis of real world code [5]_ shows that: | ||
|
||
- These features are rare (2 per million LOC in the top 8000 PyPI | ||
packages, 4 per million LOC in a random selection of packages). | ||
This could be thanks to the linters that flag this pattern. | ||
packages, 4 per million LOC in a random selection of packages). | ||
This could be thanks to the linters that flag this pattern. | ||
- Most of the usages are incorrect, and introduce unintended | ||
exception-swallowing bugs. | ||
exception-swallowing bugs. | ||
- Code owners are typically receptive to fixing the bugs, and | ||
find that easy to do. | ||
find that easy to do. | ||
|
||
This new data indicates that it would benefit Python's users if | ||
Python itself moved them away from this harmful feature. | ||
|