From 4d8fd39f168b3fc58c041b8b8f8c7e6e202b8e56 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Wed, 10 Nov 2010 22:48:15 -0800 Subject: [PATCH] Fix caviats section. --- src/tutorial/caveats.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tutorial/caveats.rst b/src/tutorial/caveats.rst index 5895c80d..c4629d9d 100644 --- a/src/tutorial/caveats.rst +++ b/src/tutorial/caveats.rst @@ -7,9 +7,10 @@ for Python users, so this list may change in the future. - ``10**-2 == 0``, instead of ``0.01`` like in Python. - Given two typed ``int`` variables ``a`` and ``b``, ``a % b`` has the - same sign as the first argument (following C semantics) rather then - having the same sign as the second (as in Python). This will change - in Cython 0.12. + same sign as the second argument (following Python semantics) rather then + having the same sign as the first (as in C). The C behavior can be + obtained, at some speed gain, by enabling the division directive. + (Versions prior to Cython 0.12. always followed C semantics.) - Care is needed with unsigned types. ``cdef unsigned n = 10; print(range(-n, n))`` will print an empty list, since ``-n`` wraps around to a large positive integer prior to being passed to the -- 2.26.2