Kent Johnson wrote:
> Luke Paireepinart wrote:
>
>> so in Python 3000 there's no more integer division?
>> I hope this is not the case.
>> Sometimes it's the desired action, like when you repeatedly divide/mod a
>> variable.
>>
>
> Integer division is still available using the // operator:
>
> In [1]: from __future__ import division
>
> In [2]: 3/2
> Out[2]: 1.5
>
> In [3]: 3//2
> Out[3]: 1
>
Ah, that's good news.
It also makes it more clear what you expect the result to be.
Thanks for the info.
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor