@@ -416,12 +416,14 @@ clauses.
416
416
--------------------------
417
417
418
418
If :keyword: `!finally ` is present, it specifies a 'cleanup' handler. The
419
- :keyword: `try ` clause is executed, including any :keyword: `except ` and
420
- :keyword: `else ` clauses. If an exception occurs in any of the clauses and is
421
- not handled, the exception is temporarily saved. The :keyword: `!finally ` clause
422
- is executed. If there is a saved exception it is re-raised at the end of the
423
- :keyword: `!finally ` clause. If the :keyword: `!finally ` clause raises another
424
- exception, the saved exception is set as the context of the new exception.
419
+ :keyword: `try ` clause is executed, including any :keyword: `except `
420
+ and :keyword: `else <except_else> ` clauses.
421
+ If an exception occurs in any of the clauses and is not handled,
422
+ the exception is temporarily saved.
423
+ The :keyword: `!finally ` clause is executed. If there is a saved exception
424
+ it is re-raised at the end of the :keyword: `!finally ` clause.
425
+ If the :keyword: `!finally ` clause raises another exception, the saved exception
426
+ is set as the context of the new exception.
425
427
If the :keyword: `!finally ` clause executes a :keyword: `return `, :keyword: `break `
426
428
or :keyword: `continue ` statement, the saved exception is discarded. For example,
427
429
this function returns 42.
0 commit comments