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

Devin Jeanpierre jeanpierreda at gmail.com
Tue Sep 13 17:04:51 CEST 2011


> Would that return 'a' or 'b', or something else?

Usually it'd return True or False. Same with things like `foo in bar`.
I just mean that we can extend these to return other objects without
insisting that builtin types (floats, sets, etc.) do weird things with
them.

Devin

On Mon, Sep 12, 2011 at 10:13 PM, Ron Adam <ron3200 at gmail.com> wrote:
> 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?
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>



More information about the Python-ideas mailing list