try-except-finally is new in 2.5.

This commit is contained in:
Georg Brandl 2007-07-29 09:11:15 +00:00
parent 304f9ff770
commit 1ae6856522
1 changed files with 3 additions and 1 deletions

View File

@ -3765,7 +3765,9 @@ been handled by an \keyword{except} clause (or it has occurred in a
\keyword{finally} clause has been executed. The \keyword{finally} clause
is also executed ``on the way out'' when any other clause of the
\keyword{try} statement is left via a \keyword{break}, \keyword{continue}
or \keyword{return} statement. A more complicated example:
or \keyword{return} statement. A more complicated example (having
\keyword{except} and \keyword{finally} clauses in the same \keyword{try}
statement works as of Python 2.5):
\begin{verbatim}
>>> def divide(x, y):