[Python-Dev] Decimal & amp; lt; -& amp; gt; float comparisons in py3k.
Greg Ewing
greg.ewing at canterbury.ac.nz
Sat Mar 20 23:43:01 CET 2010
Glenn Linderman wrote:
> One can argue that either way, that it is completely different, or
> completely the same.
An important difference is that there is no intermediate type
that can be compared with both ints and strings.
Another relevant difference is that numbers are just one of
many possible things that a string could be interpreted as
representing. Decimals, on the other hand, are just numbers
and nothing else.
(Even strings which happen to look like numbers might not be --
e.g. telephone "numbers", which are better thought of as strings
with a limited character set... despite some misguided souls
occasionally storing them in floating point. :-)
--
Greg
More information about the Python-Dev
mailing list