H
Hrvoje Niksic
I stumbled upon this. Python 2.6:
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.10.0
So it seems that Python is going out of its way to intuitively round
9.95, while the repr retains the unnecessary digits. However, with 2.7
it's exactly the opposite:
Python 2.7.0+ (r27:82500, Sep 15 2010, 18:04:55)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.9.9
Is the change to round() expected?
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.10.0
So it seems that Python is going out of its way to intuitively round
9.95, while the repr retains the unnecessary digits. However, with 2.7
it's exactly the opposite:
Python 2.7.0+ (r27:82500, Sep 15 2010, 18:04:55)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.9.9
Is the change to round() expected?