6. Built-in Exceptions Exceptions should be class objects. The
exceptions are defined in the module exceptions. This module
never needs to be imported explicitly: the exceptions are
provided in the built-in namespace as well as the For class
exceptions, in a try statement with an except clause that
mentions a particular class, that clause also handles any
exception classes derived from that class (but not exception
classes from which it is derived). Two exception classes that
are not related via subclassing are never equivalent, even if
they have the same name. The built-in exceptions listed below
can be generated by the interpreter or built-in functions.
Except where mentioned, they have an “associated value”
indicating the detailed cause of the error. This may be a string
or a tuple containing several items of information (e.g., an
error code and a string explaining the code). The associated
value is the second argument to the raise statement. If the
exception class is derived from the standard root class B