[Python-ideas] Automatic comparisons by default
raymond.hettinger at gmail.com
Wed Mar 16 02:12:18 CET 2011
>>> Two very related proposals:
>>> 1. On "!=", if Python doesn't find __ne__, use "not __eq__()".
> Isn't this implemented in Python 3?
Yes, it is :-)
>>> class A:
def __eq__(self, other):
>>> A() == A()
>>> A() != A()
It seems that very few core developers really know what is currently in Python 3. That is probably a by-product of being stuck with Python 2 at work.
More information about the Python-ideas