4.1 Standard Exceptions

All standard Python exceptions are available as global variables whose names are PyExc_ followed by the Python exception name. These have the type PyObject *; they are all string objects. For completeness, here are all the variables (the first four are new in Python 1.5a4): PyExc_Exception, PyExc_StandardError, PyExc_ArithmeticError, PyExc_LookupError, PyExc_AssertionError, PyExc_AttributeError, PyExc_EOFError, PyExc_FloatingPointError, PyExc_IOError, PyExc_ImportError, PyExc_IndexError, PyExc_KeyError, PyExc_KeyboardInterrupt, PyExc_MemoryError, PyExc_NameError, PyExc_OverflowError, PyExc_RuntimeError, PyExc_SyntaxError, PyExc_SystemError, PyExc_SystemExit, PyExc_TypeError, PyExc_ValueError, PyExc_ZeroDivisionError.



guido@CNRI.Reston.Va.US