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

It has come to our attention that our earlier statement was misinterpreted by some. Our wording was not clear enough, and we would like to clarify our intent.

The Steering Council continues to fully support both the intent and direction of PEP 765. The PEP promotes clearer and more predictable control flow, which aligns with Python’s design philosophy and long-term goals.

When we said it was “too late” to revert, that was not meant to imply that we regretted the decision. We meant that even if a PEP were made to revert the feature for 3.14, we were in the release candidate stage, and reverting the change for the 3.14 release would have created more disruption and uncertainty than it would have solved. We acknowledge that this SyntaxWarning has an impact on some users, we were aware of that when deciding to accept the PEP. We value the feedback received and welcome new ideas and perspectives. Anyone who believes that PEP 765 or its implementation should be reconsidered or would like to improve the state of warnings in Python in general is encouraged to work towards a new PEP targeted for a future Python, with clear motivation and supporting evidence, rather than reopening discussion on an accepted one.

To summarize:

  • PEP 765 remains accepted and will not be reverted in 3.14.
  • Future discussion on this topic should proceed through a new PEP if there is strong motivation to do so.

Warm regards,
Donghee
on behalf of the Python Steering Council

22 Likes