Mark Dickinson <dicki...@gmail.com> added the comment: > My complaint is that it is silently wrong.
I appreciate that, but I don't see any good solution. Yes, it would be nice if float <-> Decimal comparisons raised TypeError in 2.x. But Python 2.x has an '(almost) everything is comparable to everything else' comparison model, so that for example a list of arbitrary Python objects can almost always be sorted. So raising a TypeError for these comparisons has the potential to break already existing code. Of course, it *might* not cause any breakage at all, but it's difficult to see how one could ever be sure of that. I think the best we can do would be to add a warning for float <-> Decimal comparisons. Facundo, Raymond: does this seem reasonable? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2531> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com