Looking into Queue.py in Python 2.6, I found this construct that I found a bit strange:
def full(self):
\"\"\"Return True if the queue is full, False oth
As other's mentioned x comparison_operator y comparison_operator z
is syntactical sugar for (x comparison_operator y) and (y comparison_operator z)
with the bonus that y is only evaluated once.
So your expression 0 < 0 == 0
is really (0 < 0) and (0 == 0)
, which evaluates to False and True
which is just False
.