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.
314314 statement: break
315315 statement: continue
316316
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.
320322
321323.. index :: keyword: finally
322324
@@ -846,10 +848,6 @@ body of a coroutine function.
846848 there is a :keyword: `finally ` clause which happens to raise another
847849 exception. That new exception causes the old one to be lost.
848850
849- .. [# ] Currently, control "flows off the end" except in the case of an exception
850- or the execution of a :keyword: `return `, :keyword: `continue `, or
851- :keyword: `break ` statement.
852-
853851 .. [# ] A string literal appearing as the first statement in the function body is
854852 transformed into the function's ``__doc__ `` attribute and therefore the
855853 function's :term: `docstring `.
You can’t perform that action at this time.
0 commit comments