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.
281281 statement: break
282282 statement: continue
283283
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.
287289
288290.. index :: keyword: finally
289291
@@ -596,10 +598,6 @@ which is then bound to the class name.
596598 there is a :keyword: `finally ` clause which happens to raise another
597599 exception. That new exception causes the old one to be lost.
598600
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-
603601 .. [# ] A string literal appearing as the first statement in the function body is
604602 transformed into the function's ``__doc__ `` attribute and therefore the
605603 function's :term: `docstring `.
You can’t perform that action at this time.
0 commit comments