title: Why does the expression 0 < 0 == 0 return False in Python?
body: <p>Looking into Queue.py in Python 2.6, I found this construct that I found a bit strange:</p>
  
  <pre><code>def full(self):
      """Return True if the queue is full, False otherwise
      (not reliable!)."""
      self.mutex.acquire()
      n = 0 &lt; self.maxsize == self._qsize()
      self.mutex.release()
      return n
  </code></pre>
  
  <p>If <code>maxsize</code> is 0 the queue is never full.</p>
  
  <p>My question is how does it work for this case? How <code>0 &lt; 0 == 0</code> is considered False?</p>
  
  <pre><code>&gt;&gt;&gt; 0 &lt; 0 == 0
  False
  &gt;&gt;&gt; (0) &lt; (0 == 0)
  True
  &gt;&gt;&gt; (0 &lt; 0) == 0
  True
  &gt;&gt;&gt; 0 &lt; (0 == 0)
  True
  </code></pre>