Stefan Behnel, 13.01.2011 15:53:
> Sébastien Sablé, 13.01.2011 13:45:
>> #cython: infer_types=True
>>
>> cdef get_field_flags():
>> flags = []
>> append = flags.append
>> append('fetched')
>> ^
>> ------------------------------------------------------------
>>
>> magnum/magpy.pyx:6:10: Call with wrong number of arguments (expected 2,
>> got 1)
>>
>> The same code would work great with cython 0.13 and it would work with
>> 0.14.1 if I remove the infer_types=True line.
>
> Thanks for the report. It's quite possible that the type inference
> mechanism now assumes that the bound method is actually the C-API function
> replacement, i.e. the C function PyList_Append(). That's the wrong thing to
> infer here as it cannot be made to work.
Here's another related problem:
# cython: infer_types=True
cdef int func(int x):
return x+2
def inferred():
f = func
'f' is inferred as C function, not as function pointer.
http://trac.cython.org/cython_trac/ticket/643
http://trac.cython.org/cython_trac/ticket/644
Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev