1/2 evaluates to 0

Laurent Claessens moky.math at gmail.com
Thu Oct 13 06:04:24 EDT 2011


>>>  Wohaw. This means that this behavior is going to be default in a
>>>  foreseeable future ?
>>
>>  It's the default in 3.x. I can't imagine it ever being the default in 2.x.
>
>
> 2.7 is now in "bug-fix only" mode, so no new features, and there won't be a
> 2.8, so true division will never be the default in 2.x.

Thanks all for your ansers. I'll import division from __future__
Most of what I'm using in Python is with Sage[1]. Thus I'm not about to 
step to 3.x :(

Laurent

[1] www.sagemath.org



More information about the Python-list mailing list