[Cython] __future__.division on constants and C integers
Robert Bradshaw
robertwb at math.washington.edu
Thu Jul 9 09:38:05 CEST 2009
On Jul 8, 2009, at 12:22 PM, Stefan Behnel wrote:
> 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).
Looks good to me.
- Robert
More information about the Cython-dev
mailing list