I just reported http://trac.cython.org/cython_trac/ticket/229, which
points out that division and % on cdef ints have C rather than Python
semantics (for instance, (-1 % 16) is -1 in C, and 15 in Python).

I'm not sure what the right thing to do here is.  Using C semantics
gives faster code.  Using Python semantics is nicer (whenever I care
about the difference, I always want Python semantics) but slower, and
would be confusing to somebody who was coming from C.

But whatever happens should be prominently documented; I couldn't find
any mention of the issue in the current docs (although maybe I wasn't
looking in the right place).

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

Reply via email to