def __lt__(self, other): c = cmp_expr(self.x[0], other.x[0]) if c < 0: return True elif c > 0: return False else: # NB! Comparing form compiler data here! Assuming this is an ok operation. return self.x[1] < other.x[1]
def __lt__(self, other): # Comparing expression first c = cmp_expr(self.x[0], other.x[0]) if c < 0: return True elif c > 0: return False else: # Comparing form compiler data mds = canonicalize_metadata(self.x[1]) mdo = canonicalize_metadata(other.x[1]) return mds < mdo