1/2 evaluates to 0

Nobody nobody at nowhere.com
Wed Oct 12 07:34:21 EDT 2011


On 2011年10月12日 13:28:35 +0200, Laurent wrote:
>>>>> from __future__ import division
>>>>> 1/2
>> 0.5
>>>> 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.


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /