[Tutor] Division doesn't work
Danny Yoo
dyoo at hkn.eecs.berkeley.edu
Thu Jan 18 15:07:01 CET 2007
On Thu, 18 Jan 2007, Johan Geldenhuys wrote:
> Thanks at lot. Something as simple as that...
No, don't feel bad about it: integer division is a bad "gotcha!" in
Python. Integer division is known to be suprising, and it'll eventually
be replaced by true division in Python 3:
http://www.python.org/dev/peps/pep-0238/
Till then, just tread more careful when using division. (But you knew
division was wacky anyway... *grin*)
More information about the Tutor
mailing list