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
>>> 0 < 0 == 0
False
This is a chained comparison. It returns true if each pairwise comparison in turn is true. It is the equivalent to (0 < 0) and (0 == 0)
>>> (0) < (0 == 0)
True
This is equivalent to 0 < True
which evaluates to True.
>>> (0 < 0) == 0
True
This is equivalent to False == 0
which evaluates to True.
>>> 0 < (0 == 0)
True
Equivalent to 0 < True
which, as above, evaluates to True.