title: Why can't I use the method __cmp__ in Python 3 as for Python 2?
body: <p>The following piece of code</p>
  
  <pre><code>class point:
      def __init__(self, x, y):
          self.x = x
          self.y = y
  
      def dispc(self):
          return ('(' + str(self.x) + ',' + str(self.y) + ')')
  
      def __cmp__(self, other):
          return ((self.x &gt; other.x) and (self.y &gt; other.y))
  </code></pre>
  
  <p>works fine in Python 2, but in Python 3 I get an error:</p>
  
  <pre><code>&gt;&gt;&gt; p=point(2,3)
  &gt;&gt;&gt; q=point(3,4)
  &gt;&gt;&gt; p&gt;q
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  TypeError: unorderable types: point() &gt; point()
  </code></pre>
  
  <hr>
  
  <p>It only works for <code>==</code> and <code>!=</code>.</p>