Facundo Batista <[EMAIL PROTECTED]> added the comment:

(Ok, remember that I'm not a "numeric" guy before start hitting me, :p )

I think that if we have Decimal(1)==1, and 1==1.0, to have Decimal(1)==1.0.

We always rejected comparison with "unsupported types", but having this
situation, I'd propose to put something like the following at the
beggining of __eq__() and similars:

    def __eq__(self, other):
        if isinstance(other, float) and int(other)==other:
            other = int(other)

What do you think?

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4087>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to