/* Predefined exceptions */
+extern DL_IMPORT(PyObject *) PyExc_Exception;
extern DL_IMPORT(PyObject *) PyExc_StandardError;
extern DL_IMPORT(PyObject *) PyExc_NumberError;
extern DL_IMPORT(PyObject *) PyExc_LookupError;
/* Predefined exceptions */
+PyObject *PyExc_Exception;
PyObject *PyExc_StandardError;
PyObject *PyExc_NumberError;
PyObject *PyExc_LookupError;
int leaf_exc;
}
bltin_exc[] = {
+ {"Exception", &PyExc_Exception, 0},
{"StandardError", &PyExc_StandardError, 0},
{"NumberError", &PyExc_NumberError, 0},
{"LookupError", &PyExc_LookupError, 0},
PyTuple_SET_ITEM(PyExc_StandardError, i-1, exc);
}
PyDict_SetItemString(dict, "StandardError", PyExc_StandardError);
+
+ /* Exception is treated differently; for now, it's == StandardError */
+ PyExc_Exception = PyExc_StandardError;
+ Py_INCREF(PyExc_Exception);
+ PyDict_SetItemString(dict, "Exception", PyExc_Exception);
if (PyErr_Occurred())
Py_FatalError("Could not initialize built-in string exceptions");