diff options
author | Guido van Rossum <guido@python.org> | 1995-02-07 14:37:17 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-02-07 14:37:17 (GMT) |
commit | eb8b0d20c116766cb5a1aae275177c02526c5fd4 (patch) | |
tree | f4db62fce30b2e993bd26d8602fadbe144f4bbdb /Doc/ref7.tex | |
parent | 626c1e7882841777615345c5df7b6d3a44554d08 (diff) | |
download | cpython-eb8b0d20c116766cb5a1aae275177c02526c5fd4.zip cpython-eb8b0d20c116766cb5a1aae275177c02526c5fd4.tar.gz cpython-eb8b0d20c116766cb5a1aae275177c02526c5fd4.tar.bz2 |
added classes as exceptions
Diffstat (limited to 'Doc/ref7.tex')
-rw-r--r-- | Doc/ref7.tex | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/ref7.tex b/Doc/ref7.tex index f099ae5..196215a 100644 --- a/Doc/ref7.tex +++ b/Doc/ref7.tex @@ -201,10 +201,11 @@ clause, if present, must be last; it matches any exception. For an except clause with a condition, that condition is evaluated, and the clause matches the exception if the resulting object is ``compatible'' with the exception. An object is compatible with an exception if it -is either the object that identifies the exception or it is a tuple -containing an item that is compatible with the exception. Note that -the object identities must match, i.e. it must be the same object, not -just an object with the same value. +is either the object that identifies the exception, or (for exceptions +that are classes) it is a base class of the exception, or it is a +tuple containing an item that is compatible with the exception. Note +that the object identities must match, i.e. it must be the same +object, not just an object with the same value. \kwindex{except} If no except clause matches the exception, the search for an exception |