[issue2531] float compared to decimal is silently incorrect.
Raymond Hettinger
report at bugs.python.org
Tue Mar 17 20:51:21 CET 2009
Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:
Imri, I don't think the 3.0 model for cross-type comparisons can be
backported without breaking code, so it probably isn't going to happen.
The whole purpose of the 3.x series was to allow improvements that
weren't backwards compatible.
Mark, this raises a question for us. Now that we have
decimal.from_float(), we do have a means of making exact comparisons
between decimals and floats. While I think cross-type interaction is
generally a bad idea, the 2.x way of doing things already gives an
answer (though somewhat useless). What are your thoughts on making
Decimal('0.80') < float('0.75') do the right thing in the 2.x series so
that the answer that is given won't be flat-out wrong.
----------
assignee: -> marketdickinson
nosy: +marketdickinson, rhettinger
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2531>
_______________________________________
More information about the Python-bugs-list
mailing list