Commit 8e2b6b5c authored by Thomas Wouters's avatar Thomas Wouters

Change documentation of 'else' clause of 'try/except' to make clear that it

doesn't get triggered by 'return', 'break' or 'continue'. If the
'try-inside-continue' patch does not get accepted before next release, the
'or continue' should be removed ;P

Closes SF patch #103045 and SF bug #127098.
parent 9473649e
...@@ -242,9 +242,11 @@ that handled an exception. ...@@ -242,9 +242,11 @@ that handled an exception.
\withsubitem{(in module sys)}{\ttindex{exc_type} \withsubitem{(in module sys)}{\ttindex{exc_type}
\ttindex{exc_value}\ttindex{exc_traceback}} \ttindex{exc_value}\ttindex{exc_traceback}}
The optional \keyword{else} clause is executed when no exception occurs The optional \keyword{else} clause is executed when the \keyword{try} clause
in the \keyword{try} clause. Exceptions in the \keyword{else} clause are terminates by any means other than an exception or executing a
not handled by the preceding \keyword{except} clauses. \keyword{return}, \keyword{continue} or \keyword{break} statement.
Exceptions in the \keyword{else} clause are not handled by the preceding
\keyword{except} clauses.
\kwindex{else} \kwindex{else}
The \keyword{try}...\keyword{finally} form specifies a `cleanup' handler. The The \keyword{try}...\keyword{finally} form specifies a `cleanup' handler. The
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment