[Python-ideas] [Wild Idea] Static Ducks

Masklinn masklinn at masklinn.net
Wed Sep 23 16:16:54 CEST 2009


On 23 Sep 2009, at 15:25 , Gerald Britton wrote:
>
> Ironically, since this is a Python list:
>
>>>> 3/2
> 1.5
>
> I have to be explicit to get integer division:
>
>>>> 3//2
> 1
>
> which is precisely my point

Unless you're using Python:

 >>> 3/2
1

You have to be explicit to get true division:

 >>> 3./2
1.5





More information about the Python-ideas mailing list