Message9155
Logged In: YES
user_id=31435
Since the coercion to float is documented and intended,
it's not "a bug" (it's functioning as designed), although
you may wish to argue for a different design, in which case
making an incompatible change would first require a PEP and
community debate. Information loss in operations involving
floats comes with the territory, and I don't see a reason
to single this particular case out as especially
surprising. OTOH, I expect it would be especially
surprising to a majority of users if the implicit coercion
in
somefloat == somelong
could lead to a different result than the explicit coercion
in
long(somefloat) == somelong
Note that the "long" type isn't unique here: the same is
true of mixing Python ints with Python floats on boxes
where C longs have more bits of precision than C doubles
(e.g., Linux for IA64, and Crays). |
|
Date |
User |
Action |
Args |
2007-08-23 13:59:07 | admin | link | issue513866 messages |
2007-08-23 13:59:07 | admin | create | |
|