python类与对象
摘要:
1.改变对象的字符串显示只需要重新定义它的__str__()和__repr__()方法 >>> class Pair: ... def __init__(self,x ,y): ... self.x = x ... self.y = y ... def __repr__(self): ... ret 阅读全文
posted @ 2016-02-16 12:31 叶摇 阅读(129) 评论(0) 推荐(0)
posted @ 2016-02-16 12:31 叶摇 阅读(129) 评论(0) 推荐(0)
posted @ 2016-02-15 09:20 叶摇 阅读(155) 评论(0) 推荐(0)
posted @ 2016-01-29 18:03 叶摇 阅读(151) 评论(0) 推荐(0)
posted @ 2016-01-28 15:20 叶摇 阅读(4674) 评论(0) 推荐(0)
posted @ 2016-01-26 14:20 叶摇 阅读(110) 评论(0) 推荐(0)