Chapter 25. Exception Objects
So far, we've been deliberately vague about what an
exception actually is. Python generalizes the
notion of exceptions—they may be identified by either string or
class objects. Both have merits, but classes tend to provide a better
solution when it comes to maintaining exception hierarchies.
|