[Pyrex] Calling SuperClass.__init__() ?

Stefan Behnel behnel_ml at gkec.informatik.tu-darmstadt.de
Fri Apr 21 21:46:27 CEST 2006


Hi,

what is the correct way of calling the __init__() method in the superclass of
an extension type in Pyrex?

I tried

SuperClass.__init__(self)
super(SuperClass, self).__init__()

but both translate to plain Python calls and lookups of the __init__ method. I
guess this isn't currently special-cased, right?

As __init__ is a rather unambiguous special method, I think that
ExtensionType.__init__(...)
should calls the C function directly. Or is there any magic involved in the
Python call?

Stefan



More information about the Pyrex mailing list