def __cmp__(self, other): if other is None: return 1 if cmp(self.x, other.x): return cmp(self.x, other.x) if cmp(self.y, other.y): return cmp(self.y, other.y) return 0
def __cmp__(self, other): if other is None: return 1 if cmp(self.x, other.x): return cmp(self.x, other.x) if cmp(self.y, other.y): return cmp(self.y, other.y) return 0
def __cmp__(self, other): assert isinstance( other, type(self)), "Offer.__cmp__(): not of type Offer: %s" % repr(other) return cmp(hash(self), hash(other))
def compareFunction (self, treemodel, iter0, iter1, column): val0 = treemodel.get_value(iter0, column).split(":")[0] val1 = treemodel.get_value(iter1, column).split(":")[0] if val0.isdigit() and val1.isdigit(): return cmp(int(val0), int(val1)) return cmp(val0, val1)
def compareFunction(self, treemodel, iter0, iter1, column): val0 = treemodel.get_value(iter0, column).split(":")[0] val1 = treemodel.get_value(iter1, column).split(":")[0] if val0.isdigit() and val1.isdigit(): return cmp(int(val0), int(val1)) return cmp(val0, val1)