[Python-ideas] Break the dominance of boolean values in boolean context

Lukas Lueg lukas.lueg at googlemail.com
Tue Sep 13 17:05:10 CEST 2011

2011/9/13 Ron Adam <ron3200 at gmail.com>:
> On Mon, 2011-09-12 at 21:40 -0400, Devin Jeanpierre wrote:
>> Can we not allow things like `a < b` to return non-boolean values,
>> without altering the behaviour of existing Python types?
> Would that return 'a' or 'b', or something else?

That depends on the object at hand. 'a < b' could return 'b - a' for
set-like objects. Read 'a < b' as the answer to the question 'how much
bigger is b than a?'.

More information about the Python-ideas mailing list