partial-ordering

Why can't I use the method __cmp__ in Python 3 as for Python 2?

Why can't I use the method __cmp__ in Python 3 as for Python 2? Question: The following piece of 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 > other.x) and (self.y > other.y)) …

Total answers: 4