[Pyrex] [Pyrex, Cython]Subclass basic exceptions inside Pyrex
Daniele Pianu
muogoro at gmail.com
Tue Sep 30 16:32:39 CEST 2008
I've some problems subclassing the basic extension type. The idea is
to create my own exception hierarchy inside the Pyrex code, extending
basic Python exception objects. This is my code
cdef extern class __builtin__.Exception [object PyExc_Exception]:
pass
cdef class MyPyrexException( Exception ):
pass
The Pyrex code compiles, but when I run a Python script importing the
Python module built the interpreter raise this error:
ValueError: __builtin__.Exception does not appear to be the correct type object
Thanks for your help,
Daniele
More information about the Pyrex
mailing list