code not true?

.:|:. ng at hardlight.couk.com
Sat Apr 22 09:27:57 EDT 2000


interestingly enough on both Win32 and Linux

>>> a = 0.07 * 100

>>> a
7.0

>>> a == 7.0
0

>>> int(a) == 7
1

>>> type(a)
<type 'float'>

>>> type(7.0)
<type 'float'>

>>> (0.7 * 10) == (0.07 * 100)
0

>>>  (0.07 * 10) == (0.007 * 100)
1

>>> (0.07 * 100) == (0.007 * 1000)
0

>>> (0.07 * 1000.0) == (0.007 * 10000.0)
1








More information about the Python-list mailing list