Python比较函数__cmp__
摘要:
#!/usr/bin/pythonclass my_type(object): def __init__(self, v): self.value = v def __cmp__(self, v2): if self.value > v2.value: ... 阅读全文
posted @ 2014-12-12 22:26 store 阅读(250) 评论(0) 推荐(0) 编辑
2014年12月12日 #
posted @ 2014-12-12 22:26 store 阅读(250) 评论(0) 推荐(0) 编辑
2014年11月26日 #
posted @ 2014-11-26 22:36 store 阅读(785) 评论(0) 推荐(0) 编辑
2014年11月23日 #
posted @ 2014-11-23 22:04 store 阅读(266) 评论(0) 推荐(0) 编辑