Dan Stromberg <strombrg at dcs.nac.uci.edu> writes: > def __cmp__(self, other): > if self.a < other.a: > return -1 > elif self.a > other.a: > return 1 > else: > return 0 I think I'd have written return cmp(self.a, other.a)