mir aufgefallen, dass in Python2.6 Zahlen mit Nachkommastellen anders ausgegeben werden als in Python2.7.
Python2.6:
Code: Alles auswählen
Python 2.6.7 (r267:88850, Jul 10 2011, 08:11:54)
[GCC 4.6.1] on linux2
>>> a = 11.123456
>>> round(a,2)
11.119999999999999
>>> round(a)
11.0
Code: Alles auswählen
Python 2.7.2+ (default, Aug 16 2011, 09:23:59)
[GCC 4.6.1] on linux2
>>> a = 11.123456
>>> round(a, 2)
11.12
>>> round(a)
11.0
Betriebsystem falls relevevant: Debian (testing, 64bit).
Hat jemand einen Hinweis?
Vielen Dank vorab!
Gruß
Reg