最新回答 / 慕数据0495159
python的2.x中已经舍弃了cmp函数,相关替换参考:http://blog.csdn.net/sushengmiyan/article/details/11332589
2016-06-29
最赞回答 / 慕粉3416894
get_score方法用于获取属性__score的值,由于__score为内部属性,外部无法访问,故需使用get_score方法获取属性__score的值例中的get_score方法与set_score方法不是特殊方法
2016-06-15
最新回答 / Ramon_Lee
if self.__score>=85:print u'A-优秀'elif self.__score>=60:print u'B-及格'else:print u'C-不及格'你使用 u'A-优秀' 能打印出结果吗?我的老报错,就是打印不出A-优秀,我的是python2
2016-06-08
最新回答 / 慕勒9756884
不然你试试在lambda前加个key=,我在http://stackoverflow.com/questions/23082372/sorting-a-list-with-lambda-with-a-variable-number-of-arguments看到个感觉和你很像的问题,刚学,共勉
2016-06-04