涛子 - 简单就是美

成单纯魁增,永继振国兴,克复宗清政,广开家必升

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2015年8月26日

摘要: ####实例方法```pythonclass Human(object): def __init__(self, weight): self.weight = weight def get_weight(self): return self.weight... 阅读全文
posted @ 2015-08-26 17:12 北京涛子 阅读(225) 评论(0) 推荐(0)

摘要: ####普通继承```pythonclass FooParent(object): def __init__(self): self.parent = 'I\'m the parent.' print 'Parent' def bar(self, messag... 阅读全文
posted @ 2015-08-26 16:20 北京涛子 阅读(177) 评论(0) 推荐(0)

摘要: https://www.zhihu.com/question/31265857 http://www.cnblogs.com/huxi/archive/2011/03/01/1967600.html 方法装饰器 类装饰器 阅读全文
posted @ 2015-08-26 15:04 北京涛子 阅读(193) 评论(0) 推荐(0)

摘要: ####参考http://openhome.cc/Gossip/Python/Property.htmlhttp://pyiner.com/2014/03/09/Python-property.html```在Python中property()是一个内建函数,创建并返回一个property对象。函数... 阅读全文
posted @ 2015-08-26 11:58 北京涛子 阅读(598) 评论(0) 推荐(0)