Skip to content

[3.9] bpo-32822: Add finally with return/break/continue to the tutorial (GH-25600) #25890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Doc/tutorial/errors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,10 @@ points discuss more complex cases when an exception occurs:
or :keyword:`!else` clause. Again, the exception is re-raised after
the :keyword:`!finally` clause has been executed.

* If the :keyword:`!finally` clause executes a :keyword:`break`,
:keyword:`continue` or :keyword:`return` statement, exceptions are not
re-raised.

* If the :keyword:`!try` statement reaches a :keyword:`break`,
:keyword:`continue` or :keyword:`return` statement, the
:keyword:`!finally` clause will execute just prior to the
Expand Down
1 change: 1 addition & 0 deletions Misc/ACKS
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,7 @@ Christian Hudon
Benoît Hudson
Lawrence Hudson
Michael Hudson
Roberto Hueso Gomez
Jim Hugunin
Greg Humphreys
Chris Hunt
Expand Down