Ternary Operator in Python

Sunnan sunnan at handgranat.org
Fri Apr 1 22:34:22 EST 2005


Terry Reedy wrote:
> Gee, what about 0.0 < a < 1.0 < b < 2.0?  I see both as synthesized 
> multinary operators, but your are right in that this combination does act 
> differently than a+b+c.

Is < really multinary in python? It looks binary to me, just like +.

(a+b)+c

(((0.0 < a) < 1.0) < b ) < 2.0
Sunnan



More information about the Python-list mailing list