Am 23.10.2011 06:09, schrieb Lee: > Hi all, > > Where does PyExc_TypeError (and alike) points to? I can see its > declaration - PyAPI_DATA(PyObject *) PyExc_TypeError; - in pyerrors.h > but I cannot figure out what it is its value, where it is > initialized.
It's initialized in Objects/exceptions.c SimpleExtendsException(PyExc_StandardError, TypeError, "Inappropriate argument type."); SimpleExtendsException() is a macro that defines a PyTypeObject and stores a cast to PyObject in PyExc_TypeError. Christian -- http://mail.python.org/mailman/listinfo/python-list