[Cython] Equivalent of __new__() in python
Greg Ewing
greg.ewing at canterbury.ac.nz
Tue Feb 3 04:44:32 CET 2009
Arnaud Bergeron wrote:
> I want to have only one instance at a time with a single value of val.
>
> I already know how to do this in python using the __new__() method and
> a WeakValueDictionary. I am looking for a way to do the equivalent in
> cython.
This can't be done yet, because you don't get a chance
to directly override the tp_new slot. I intend to fix
this in some future version of Pyrex.
--
Greg
More information about the Cython-dev
mailing list