diff options
author | Thomas Wouters <thomas@python.org> | 2000-12-31 22:52:59 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2000-12-31 22:52:59 (GMT) |
commit | 8e2b6b5cc7c2141fb49b49e60a3e27815836730c (patch) | |
tree | c21bf24bcab81984a7dc4fdb371c2cb43f6bd911 /Doc/ref | |
parent | 9473649e90fc65513e6c64cf081300d8bd3f6cee (diff) | |
download | cpython-8e2b6b5cc7c2141fb49b49e60a3e27815836730c.zip cpython-8e2b6b5cc7c2141fb49b49e60a3e27815836730c.tar.gz cpython-8e2b6b5cc7c2141fb49b49e60a3e27815836730c.tar.bz2 |
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.
Diffstat (limited to 'Doc/ref')
-rw-r--r-- | Doc/ref/ref7.tex | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Doc/ref/ref7.tex b/Doc/ref/ref7.tex index 6356cd8..9541718 100644 --- a/Doc/ref/ref7.tex +++ b/Doc/ref/ref7.tex @@ -242,9 +242,11 @@ that handled an exception. \withsubitem{(in module sys)}{\ttindex{exc_type} \ttindex{exc_value}\ttindex{exc_traceback}} -The optional \keyword{else} clause is executed when no exception occurs -in the \keyword{try} clause. Exceptions in the \keyword{else} clause are -not handled by the preceding \keyword{except} clauses. +The optional \keyword{else} clause is executed when the \keyword{try} clause +terminates by any means other than an exception or executing a +\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} The \keyword{try}...\keyword{finally} form specifies a `cleanup' handler. The |