Possible Duplicate:
Why does the expression 0 < 0 == 0 return False in Python?
The following output from the Python 2 REPL confuses me:
>>> 15>10==True
False
>>> 15>1==True
True
>>> 15>2==True
False
>>> 15>False
True
If 15>10==True is evaluated as (15>10)==True the expression would simplify to print True==True, which obviously evaluates to True. If 15>10==True is evaluated as 15>(10==True) the expression simplifies to 15>False which also evaluates to True. Both of these interpretations contradict the actual value of the expression (False).
I can understand 15>1==True evaluating to True since 1==True is true, but no interpretation of 15>10==True makes sense to me.
Summary: In Python 2, why does 15>10==True evaluate to False?