Skip to content

Commit 68040ed

Browse files
miss-islingtonprodehghan
authored andcommitted
bpo-38130: Fix error in explaining when an exception is re-raised (GH-16016) (GH-16415)
Co-Authored-By: Ashwin Ramaswami <[email protected]> (cherry picked from commit 1ad7be2) Co-authored-by: Mohammad Dehghan <[email protected]>
1 parent b3c35fe commit 68040ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/tutorial/errors.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ example::
343343

344344
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:
345345

346-
* 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.
346+
* 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.
347347

348348
* 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.
349349

0 commit comments

Comments
 (0)