>>> from __future__ import division
>>> 4 / 5 # normal division
0.80000000000000004 # <-- there is an extra '4' at the end
>>> 4 // 5 # integer division
0
Are any of these things fixed in python 3? >>> from __future__ import division
>>> 4 / 5 # normal division
0.80000000000000004 # <-- there is an extra '4' at the end
>>> 4 // 5 # integer division
0
Are any of these things fixed in python 3?Comprehensive paper going into depth about many other issues: http://docs.sun.com/source/806-3568/ncg_goldberg.html
If you don't understand the above, your missiles may kill you and your rockets may explode: http://www.ima.umn.edu/~arnold/455.f96/disasters.html
However if you don't care about performance but want precision, you can use e.g. the Decimal module (which is a little annoying with syntax help from the compiler) or perhaps various wrappers for arbitrary precision libraries that are around.
It seems to make things more reasonable. After all, Python has showed that saying "that just how it works" can be avoided, as in the case of / defaulting to floating-point division.
But, you can make Python use the decimal style if you use the Decimal (or similar) library. Also, you can use certain wrappers for Python such as Sage to do something similar. I am a great fan of Sage for certain tasks personally.