Carl Witty wrote:
> On Fri, Mar 13, 2009 at 12:53 AM, Stefan Behnel 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'm not sure. This should certainly be supported for Python classes, but
for extension types? What would be the use case?

Stefan

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to