[Cython] Argument type declaration question
Jason Evans
jasone at canonware.com
Mon Oct 27 17:27:12 CET 2008
I would like to be able to write code like the following:
cdef foo(int i, dict d, list l, str s):
...
But somehow str is treated differently than int, dict, list, etc., which
means I have to write:
cdef foo(int i, dict d, list l, s):
assert type(s) == str
...
I don't understand why this limitation exists. Is it some artifact of
the support for implicit casting for char * arguments?
Thanks,
Jason
More information about the Cython-dev
mailing list