Skip to content

Commit

Permalink
bpo-38130: Fix error in explaining when an exception is re-raised (GH…
Browse files Browse the repository at this point in the history
…-16016) (GH-16416)

Co-Authored-By: Ashwin Ramaswami <aramaswamis@gmail.com>
(cherry picked from commit 1ad7be2)

Co-authored-by: Mohammad Dehghan <md.unicorn@gmail.com>
  • Loading branch information
2 people authored and matrixise committed Sep 26, 2019
1 parent 80bde15 commit 5017a64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Doc/tutorial/errors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ example::

If a :keyword:`finally` clause is present, the :keyword:`finally` clause will execute as the last task before the :keyword:`try` statement completes. The :keyword:`finally` clause runs whether or not the :keyword:`try` statement produces an exception. The following points discuss more complex cases when an exception occurs:

* If an exception occurs during execution of the :keyword:`!try` clause, the exception may be handled by an :keyword:`except` clause. In all cases, the exception is re-raised after the :keyword:`!finally` clause has been executed.
* If an exception occurs during execution of the :keyword:`!try` clause, the exception may be handled by an :keyword:`except` clause. If the exception is not handled by an :keyword:`except` clause, the exception is re-raised after the :keyword:`!finally` clause has been executed.

* An exception could occur during execution of an :keyword:`!except` or :keyword:`!else` clause. Again, the exception is re-raised after the :keyword:`!finally` clause has been executed.

Expand Down

0 comments on commit 5017a64

Please sign in to comment.