这段代码看不懂,有人能解释一下吗 谢谢
def __cmp__(self, s): if self.score == s.score: return cmp(self.name, s.name) return -cmp(self.score, s.score)
def __cmp__(self, s): if self.score == s.score: return cmp(self.name, s.name) return -cmp(self.score, s.score)
2017-09-17
举报