True == 1 weirdness

Ian Kelly ian.g.kelly at gmail.com
Thu Sep 17 20:49:06 CEST 2015


On Thu, Sep 17, 2015 at 1:06 AM, Jussi Piitulainen
<harvesting at makes.email.invalid> wrote:
> Ordinary binary operators not only combine things of the same type, they
> also produce a thing of that same type. So 'in' does not fit among them
> either.
>
> I feel it's _more_ at home among comparison operators. (Hm. That's
> 'operator' in a different sense.)

Comparison operators *are* binary operators. All that "binary" means
is that it takes two arguments.


More information about the Python-list mailing list