Comparing float and decimal
Michael Palmer
m_palmer45 at yahoo.ca
Tue Sep 23 10:08:07 EDT 2008
> > This seems to break the rule that if A is equal to B and B is equal to C
> > then A is equal to C.
>
> I don't see why transitivity should apply to Python objects in general.
Well, for numbers it surely would be a nice touch, wouldn't it.
May be the reason for Decimal to accept float arguments is that
irrational numbers or very long rational numbers cannot be converted
to a Decimal without rounding error, and Decimal doesn't want any part
of it. Seems pointless to me, though.
More information about the Python-list
mailing list