Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.stsci.edu/spst/UnixTransition/doc/exceptions.html
Дата изменения: Wed Jan 7 09:18:04 2004
Дата индексирования: Sat Mar 1 15:07:37 2014
Кодировка:

Поисковые слова: ultraviolet
exceptions


 
 exceptions
 (built-in)

Python's standard exception class hierarchy.
 
Before Python 1.5, the standard exceptions were all simple string objects.
In Python 1.5, the standard exceptions were converted to classes organized
into a relatively flat hierarchy.  String-based standard exceptions were
optional, or used as a fallback if some problem occurred while importing
the exception module.  With Python 1.6, optional string-based standard
exceptions were removed (along with the -X command line flag).
 
The class exceptions were implemented in such a way as to be almost
completely backward compatible.  Some tricky uses of IOError could
potentially have broken, but by Python 1.6, all of these should have
been fixed.  As of Python 1.6, the class-based standard exceptions are
now implemented in C, and are guaranteed to exist in the Python
interpreter.
 
Here is a rundown of the class hierarchy.  The classes found here are
inserted into both the exceptions module and the `built-in' module.  It is
recommended that user defined class based exceptions be derived from the
`Exception' class, although this is currently not enforced.
 
Exception
 |
 +-- SystemExit
 +-- StopIteration
 +-- StandardError
 |    |
 |    +-- KeyboardInterrupt
 |    +-- ImportError
 |    +-- EnvironmentError
 |    |    |
 |    |    +-- IOError
 |    |    +-- OSError
 |    |         |
 |    |         +-- WindowsError
 |    |
 |    +-- EOFError
 |    +-- RuntimeError
 |    |    |
 |    |    +-- NotImplementedError
 |    |
 |    +-- NameError
 |    |    |
 |    |    +-- UnboundLocalError
 |    |
 |    +-- AttributeError
 |    +-- SyntaxError
 |    |    |
 |    |    +-- IndentationError
 |    |         |
 |    |         +-- TabError
 |    |
 |    +-- TypeError
 |    +-- AssertionError
 |    +-- LookupError
 |    |    |
 |    |    +-- IndexError
 |    |    +-- KeyError
 |    |
 |    +-- ArithmeticError
 |    |    |
 |    |    +-- OverflowError
 |    |    +-- ZeroDivisionError
 |    |    +-- FloatingPointError
 |    |
 |    +-- ValueError
 |    |    |
 |    |    +-- UnicodeError
 |    |
 |    +-- ReferenceError
 |    +-- SystemError
 |    +-- MemoryError
 |
 +---Warning
      |
      +-- UserWarning
      +-- DeprecationWarning
      +-- SyntaxWarning
      +-- OverflowWarning
      +-- RuntimeWarning


 Classes
                                                                                                                                                                                                                               
Exception
StandardError
ArithmeticError
FloatingPointError
OverflowError
ZeroDivisionError
AssertionError
AttributeError
EOFError
EnvironmentError
IOError
OSError
ImportError
KeyboardInterrupt
LookupError
IndexError
KeyError
MemoryError
NameError
UnboundLocalError
ReferenceError
RuntimeError
NotImplementedError
SyntaxError
IndentationError
TabError
SystemError
TypeError
ValueError
UnicodeError
StopIteration
SystemExit
Warning
DeprecationWarning
OverflowWarning
RuntimeWarning
SyntaxWarning
UserWarning


 class ArithmeticError(StandardError)
           Base class for arithmetic errors.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class AssertionError(StandardError)
           Assertion failed.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class AttributeError(StandardError)
           Attribute not found.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class DeprecationWarning(Warning)
           Base class for warnings about deprecated features.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class EOFError(StandardError)
           Read beyond end of file.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class EnvironmentError(StandardError)
           Base class for I/O related errors.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class Exception
           Common base class for all exceptions.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class FloatingPointError(ArithmeticError)
           Floating point operation failed.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class IOError(EnvironmentError)
           I/O operation failed.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class ImportError(StandardError)
           Import can't find module, or can't find name in module.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class IndentationError(SyntaxError)
           Improper indentation.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class IndexError(LookupError)
           Sequence index out of range.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class KeyError(LookupError)
           Mapping key not found.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class KeyboardInterrupt(StandardError)
           Program interrupted by user.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class LookupError(StandardError)
           Base class for lookup errors.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class MemoryError(StandardError)
           Out of memory.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class NameError(StandardError)
           Name not found globally.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class NotImplementedError(RuntimeError)
           Method or function hasn't been implemented yet.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class OSError(EnvironmentError)
           OS system call failed.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class OverflowError(ArithmeticError)
           Result too large to be represented.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class OverflowWarning(Warning)
           Base class for warnings about numeric overflow.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class ReferenceError(StandardError)
           Weak ref proxy used after referent went away.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class RuntimeError(StandardError)
           Unspecified run-time error.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class RuntimeWarning(Warning)
           Base class for warnings about dubious runtime behavior.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class StandardError(Exception)
           Base class for all standard Python exceptions.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class StopIteration(Exception)
           Signal the end from iterator.next().
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class SyntaxError(StandardError)
           Invalid syntax.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class SyntaxWarning(Warning)
           Base class for warnings about dubious syntax.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class SystemError(StandardError)
           Internal error in the Python interpreter.
 
Please report this to the Python maintainer, along with the traceback,
the Python version, and the hardware/OS platform and version.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class SystemExit(Exception)
           Request to exit from the interpreter.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class TabError(IndentationError)
           Improper mixture of spaces and tabs.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class TypeError(StandardError)
           Inappropriate argument type.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class UnboundLocalError(NameError)
           Local name referenced but not bound to a value.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class UnicodeError(ValueError)
           Unicode related error.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class UserWarning(Warning)
           Base class for warnings generated by user code.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class ValueError(StandardError)
           Inappropriate argument value (of correct type).
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class Warning(Exception)
           Base class for warning categories.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string


 class ZeroDivisionError(ArithmeticError)
           Second argument to a division or modulo operation was zero.
 
                                                                                                                                                                                                                     
__getitem__(...)
no doc string
__init__(...)
no doc string
__str__(...)
no doc string