diff options
author | Fred Drake <fdrake@acm.org> | 1999-08-24 22:14:57 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1999-08-24 22:14:57 (GMT) |
commit | 2900ff93821743eef54d46e65b84c1afa497ef2b (patch) | |
tree | 228a0b596a525a9677a1d0d3201b8a4fea3697fc /Doc/tut | |
parent | 4c2533fe3c54afd577062d3e7c879040516a0aba (diff) | |
download | cpython-2900ff93821743eef54d46e65b84c1afa497ef2b.zip cpython-2900ff93821743eef54d46e65b84c1afa497ef2b.tar.gz cpython-2900ff93821743eef54d46e65b84c1afa497ef2b.tar.bz2 |
Added paragraph explaining that except clauses can't be empty; that
pass can be used if needed. By Dan Wolfe <wolfeman@apple.com>.
Diffstat (limited to 'Doc/tut')
-rw-r--r-- | Doc/tut/tut.tex | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/tut/tut.tex b/Doc/tut/tut.tex index c373733..f52ec61 100644 --- a/Doc/tut/tut.tex +++ b/Doc/tut/tut.tex @@ -2751,6 +2751,10 @@ wildcard. Use this with extreme caution, since it is easy to mask a real programming error in this way! +Each exception clause must have at least one line of executable code +in the block. Comments are not executable code. If you want the +exception clause to do nothing, use the \keyword{pass} statement. + The \keyword{try} \ldots\ \keyword{except} statement has an optional \emph{else clause}, which must follow all except clauses. It is useful to place code that must be executed if the try clause does not |