The problem seems to be that SliceIndexNode.analyse_as_type returns
just None, thus visit_FuncDefNode throws an error in the cython.locals
analysis part. Since a slice can be viewed as a type in the context of
cython.locals and cython.declare, analyse_as_type shouldn't return
None.

This is my first contact with cython codebase so this is as far as I'm
going for the time being. But with appropriate guidance I could figure
out a fix, I guess.

> PS: do you know of any workaround?

Btw, by inspecting the code I have found a workaround using named
types, that is the string representation of the type. I think the
documentation for pure python mode should mention this possibility in
the "C types" section, as it's a sure fallback for fancy types not directly
supported as python objects. A good place to include this valuable
information is after the caveat "A limited attempt is made to emulate
these more complex types...". I should add that the documentation
does include an example in which named types are used for signature
annotations, though it's pretty elliptical.

Cheers
--
Carlos
_______________________________________________
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel

Reply via email to