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 @@ -281,9 +281,11 @@ function that handled an exception.
281
281
statement: break
282
282
statement: continue
283
283
284
- The optional :keyword: `else ` clause is executed if and when control flows off
285
- the end of the :keyword: `try ` clause. [# ]_ Exceptions in the :keyword: `else `
286
- clause are not handled by the preceding :keyword: `except ` clauses.
284
+ The optional :keyword: `else ` clause is executed if the control flow leaves the
285
+ :keyword: `try ` suite, no exception was raised, and no :keyword: `return `,
286
+ :keyword: `continue `, or :keyword: `break ` statement was executed. Exceptions in
287
+ the :keyword: `else ` clause are not handled by the preceding :keyword: `except `
288
+ clauses.
287
289
288
290
.. index :: keyword: finally
289
291
@@ -596,10 +598,6 @@ which is then bound to the class name.
596
598
there is a :keyword: `finally ` clause which happens to raise another
597
599
exception. That new exception causes the old one to be lost.
598
600
599
- .. [# ] Currently, control "flows off the end" except in the case of an exception or the
600
- execution of a :keyword: `return `, :keyword: `continue `, or :keyword: `break `
601
- statement.
602
-
603
601
.. [# ] A string literal appearing as the first statement in the function body is
604
602
transformed into the function's ``__doc__ `` attribute and therefore the
605
603
function's :term: `docstring `.
You can’t perform that action at this time.
0 commit comments