title: Python: Why does the int class not have rich comparison operators like `__lt__()`?
body: <p>Mostly curious.</p>
  
  <p>I've noticed (at least in py 2.6 and 2.7) that a <code>float</code> has all the familiar rich comparison functions: <code>__lt__()</code>, <code>__gt__</code>, <code>__eq__</code>, etc.</p>
  
  <pre><code>&gt;&gt;&gt; (5.0).__gt__(4.5)
  True
  </code></pre>
  
  <p>but an <code>int</code> does not</p>
  
  <pre><code>&gt;&gt;&gt; (5).__gt__(4)
  Traceback (most recent call last):
    File "&lt;input&gt;", line 1, in &lt;module&gt;
  AttributeError: 'int' object has no attribute '__gt__'
  </code></pre>
  
  <p>Which is odd to me, because the operator itself works fine</p>
  
  <pre><code>&gt;&gt;&gt; 5 &gt; 4
  True
  </code></pre>
  
  <p>Even strings support the comparison functions</p>
  
  <pre><code>&gt;&gt;&gt; "hat".__gt__("ace")
  True
  </code></pre>
  
  <p>but all the <code>int</code> has is <code>__cmp__()</code></p>
  
  <p>Seems strange to me, and so I was wondering why this came to be. </p>
  
  <p>Just tested and it works as expected in python 3, so I am assuming some legacy reasons. Still would like to hear a proper explanation though ;)</p>