> Hi,
>
> Dag Sverre Seljebotn wrote:
>> - Allow the "typeof" operator in variable declarations in function
>> bodies
>> to resolve the actual type of the generic.
>
> What's the "typeof" operator?

Just skim http://wiki.cython.org/enhancements/compiledducktyping once more
:-)

It is used in type specification context and allows for this:

cdef int some_func(generic arg):
    cdef typeof(arg) tmp
    tmp = arg + 4
    ....
    return tmp

(I suppose it doesn't allow fetching the type of the result though. Is
this wanted? How to make it happen... typeof_retval or
typeof(result=True)?)

If this turns out to be complicated we can just drop it from the initial
feature set. I think I don't need it for NumPy anyway.

Dag Sverre

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

Reply via email to