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 exceptions module.
DeprecationWarningin Python 2.5 and newer. In future versions, support for string exceptions will be removed. BaseException, the associated value is present as the exception instance's args attribute. If there is a single argument (as is preferred), it is bound to the message attributes.
errno.hvalues. This is a subclass of OSError. New in version 2.0. Changed in version 2.5: Previous versions put the GetLastError() codes into errno.
The following exceptions are used as warning categories; see the warnings module for more information.
The class hierarchy for built-in exceptions is:
BaseException +--