See All Titles |
![]() ![]() Standard ExceptionsAll 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 either class objects or string objects, depending on the use of the -X option to the interpreter. For completeness, all the variables are in Table A.1.
Deprecation of String ExceptionsThe -X command-line option will be removed in Python 1.6/2.0. All exceptions built into Python or provided in the standard library will be classes derived from Exception. String exceptions will still be supported in the interpreter to allow existing code to run unmodified, but this will also change in a future release.
|
Index terms contained in this sectionApplication Programmers Interface (API)Python/C variables, exceptions exceptions variables, Python/C Applications Programmers Interface (API) global variables, Python/C Application Programmers Interface (API) interfaces Python/C Application Programmers (API) variables, exceptions Python/C Application Programmers Interface (API) variables, exceptions variables exceptions, Python/C Application Programmers Interface (API) |
© 2002, O'Reilly & Associates, Inc. |