[Cython] __future__.division on constants and C integers
Stefan Behnel
stefan_ml at behnel.de
Wed Jul 8 21:22:19 CEST 2009
Stefan Behnel wrote:
> in the current implementation, __future__.division only applies when
> dividing non-constant Python values
> [...]
> My opinion on this is: if you request true division semantics by importing
> __future__.division, you should get true division in all places where you
> use the "/" operator.
I committed the change in
http://hg.cython.org/cython-unstable/rev/a3ad25325fe4
I may be a little more complicated than necessary, but it works in all
cases I could come up with (see the end of the changeset for tests).
Stefan
More information about the Cython-dev
mailing list