File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -314,9 +314,11 @@ from a function that handled an exception.
314
314
statement: break
315
315
statement: continue
316
316
317
- The optional :keyword: `else ` clause is executed if and when control flows off
318
- the end of the :keyword: `try ` clause. [# ]_ Exceptions in the :keyword: `else `
319
- clause are not handled by the preceding :keyword: `except ` clauses.
317
+ The optional :keyword: `else ` clause is executed if the control flow leaves the
318
+ :keyword: `try ` suite, no exception was raised, and no :keyword: `return `,
319
+ :keyword: `continue `, or :keyword: `break ` statement was executed. Exceptions in
320
+ the :keyword: `else ` clause are not handled by the preceding :keyword: `except `
321
+ clauses.
320
322
321
323
.. index :: keyword: finally
322
324
@@ -847,10 +849,6 @@ body of a coroutine function.
847
849
there is a :keyword: `finally ` clause which happens to raise another
848
850
exception. That new exception causes the old one to be lost.
849
851
850
- .. [# ] Currently, control "flows off the end" except in the case of an exception
851
- or the execution of a :keyword: `return `, :keyword: `continue `, or
852
- :keyword: `break ` statement.
853
-
854
852
.. [# ] A string literal appearing as the first statement in the function body is
855
853
transformed into the function's ``__doc__ `` attribute and therefore the
856
854
function's :term: `docstring `.
You can’t perform that action at this time.
0 commit comments