Built-in Exceptions
===================
-.. module:: exceptions
- :synopsis: Standard exception classes.
-
-
-Exceptions should be class objects. The exceptions are defined in the module
-:mod:`exceptions`. This module never needs to be imported explicitly: the
-exceptions are provided in the built-in namespace as well as the
-:mod:`exceptions` module.
-
.. index::
statement: try
statement: except
-For class exceptions, in a :keyword:`try` statement with an :keyword:`except`
+In Python, all exceptions must be instances of a class that derives from
+:class:`BaseException`. In a :keyword:`try` statement with an :keyword:`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
defining exceptions is available in the Python Tutorial under
:ref:`tut-userexceptions`.
-The following exceptions are only used as base classes for other exceptions.
+The following exceptions are used mostly as base classes for other exceptions.
.. XXX document with_traceback()
In this last case, :attr:`args` contains the verbatim constructor arguments as a
tuple.
-The following exceptions are the exceptions that are actually raised.
+The following exceptions are the exceptions that are usually raised.
.. exception:: AssertionError
associated value is a string indicating the type of the operands and the
operation.
+
The following exceptions are used as warning categories; see the :mod:`warnings`
module for more information.
-
.. exception:: Warning
Base class for warning categories.