On Fri, Mar 13, 2009 at 12:53 AM, Stefan Behnel <stefan...@behnel.de> wrote:
>> I don't understand why I'm getting the error. If I call a cdef function
>> instead of a cdef method, it works OK; but shouldn't I be able to call a
>> cdef method and passing a C type instead of a Python type? Otherwise, I
>> will need to add an external cdef function for each class to create the
>> object from the struct... I must be doing something wrong :).
>
> I consider this a deficiency of Cython. It should know the type of the
> result when you call an extension type.
>
> http://trac.cython.org/cython_trac/ticket/232

Hmm... I hope that eventually Cython will allow overriding __new__, at
which point calling an extension type won't necessarily return a value
of that type.  (I see that Robert already made this point in a comment
on the ticket.)

Carl
_______________________________________________
Cython-dev mailing list
Cython-dev@codespeak.net
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to