Re: Opaque structures and Extension Types

Greg Ewing <[email protected]> Thu, 15 May 2008 11:47:33 +1200
Newsgroups gmane.comp.python.pyrex
Message-ID <[email protected]>
Roberto Cavada wrote:

> My way of handling allocation and
> initialization of classes in C would require that __cinit__ of
> derived class would be not called at all, as for example
> Worker_create already handles the allocation and initialization of
> Person and Worker structures.

I think you'll just have to initialise the struct in
__init__ rather than __cinit__, then you'll get
control over whether the base class __init__ is
called or not.

It's not entirely safe, but it's about the best that
can be done until I do something about providing a
more Python-like __new__ method.

-- 
Greg