def _cmp(self, other): # Note reversed name ordering bc = bytescmp(other.name, self.name) if bc != 0: return bc vc = self.is_valid() - other.is_valid() if vc != 0: return vc fc = self.is_fake() - other.is_fake() if fc != 0: return fc return 0