[Python-ideas] Automatic comparisons by default

Facundo Batista facundobatista at gmail.com
Tue Mar 15 20:12:53 CET 2011

On Tue, Mar 15, 2011 at 2:47 PM, Guido van Rossum <guido at python.org> wrote:

>> 2. On "<=", if Python doesn't find __le__, use "__eq__() or __lt__()".
>> The same for ">=", of course.
> Big -1 for this. Inequalities (orderings) are much more subtle than
> equalities. See e.g. sets.

But in those cases all comparison methods could be defined, so Python
will not do any automatic one. Or you say this is too implicit?

(btw, good reference to the sets)

.    Facundo

Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/

More information about the Python-ideas mailing list