Stefan Behnel wrote: > Jørgen P. Tjernø wrote: >> cdef class SessionStruct: >> cdef Album _create_album(self, album* album, bint take_owner=?) >> >> cdef class Album(SessionStruct): >> pass > > This is some unusual code. Letting a superclass know its subtypes is rarely > a good design. True. It's more of a "gather state and methods that all these classes need in a single place", so it could just as well be represented as a "has-a" instead of a "is-a". :-)
> Anyway, I consider it a bug that it doesn't raise an error because of the > missing base class in the pre-declaration. Ah, great. :) > It should be declared like this: > > cdef class SessionStruct > cdef class Album(SessionStruct) I'll update my code to reflect this. Thanks! -- Kindest regards, Jørgen P. Tjernø. _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
