Skip to content

Commit 71db2dd

Browse files
Apply suggestions from code review
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parent b671029 commit 71db2dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

peps/pep-0765.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Change Semantics
169169
----------------
170170

171171
It `was suggested <https://discuss.python.org/t/pep-765-disallow-return-break-continue-that-exit-a-finally-block/71348/32>`__
172-
to change the semantics of control flow instruction in finally such that an
172+
to change the semantics of control flow instructions in finally such that an
173173
in-flight exception takes precedence over them. In other words, a ``return``,
174174
``break`` or ``continue`` would be permitted, and would exit the ``finally``
175175
block, but the exception would still be raised.
@@ -182,7 +182,7 @@ in rare edge cases at runtime, and is not guaranteed to be detected in testing.
182182
Even if the code is wrong, and has an exception swallowing bug, it could be
183183
hard for users to understand why a program started raising exceptions in 3.14,
184184
while it did not in 3.13.
185-
In contrast, a ``SyntaxError`` is likely to be seen during testing, it would
185+
In contrast, a ``SyntaxWarning`` is likely to be seen during testing, it would
186186
point to the precise location of the problem in the code, and it would not
187187
prevent the program from running.
188188

@@ -191,7 +191,7 @@ allowing control flow statements is not that this would be useful, but rather
191191
the desire for orthogonality of features (which, as we mentioned in the
192192
introduction, is already violated in the case of ``except*`` clauses). However,
193193
the proposed semantics are complicated because they suggest that ``return``,
194-
``break`` and ``continue`` behave as they normally when finally is called
194+
``break`` and ``continue`` behave as they normally when ``finally`` is used
195195
without an in-flight exception, but turn into something like a bare ``raise``
196196
when there is one. It is hard to claim that the features are orthogonal if
197197
the presence of one changes the semantics of the other.

0 commit comments

Comments
 (0)