[issue2531] float compared to decimal is silently incorrect.
report at bugs.python.org
Wed Apr 1 23:30:52 CEST 2009
Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:
Mark, I looked at your patch again and think we should support relaxed
conversions for ordering comparisons but not equality/inequality. This
will improve on the current situation where we get flat-out misleading
results for <, <=, >, and >=. It keeps the status quo for
equality/inequality and thereby avoids the problems with __hash__.
The only thing that I don't like about it is that you can't do the usual
reasoning where "not a<b and not a>b" implies "a==b". Still, it is an
improvement over "a<b" giving a completely useless and misleading result.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list