2008/12/22 Stefan Behnel email@example.com:
The quick way to fix your problem might be to write the exception code in Cython like thís:
class MyException(Exception): def __init__(self, errorcode, message): super(MyException, self).__init__(self, message) self.errorcode = errorcode
and use that instead. You can also make it an exception class if you like, by declaring the Exception class as an external type (requires Py2.5+). In this case, Cython can generate a header file for you that declares your new extension type.
thanks for the tip, I'll surely look at Cython and how it can help ;-) Thanks for the pointer and for the example!