赵乐ACM

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

2013年3月22日

摘要: 1. 今天学了一些概念。(书的第41~43章)用这个方法可以分清楚class、object、instance## Animal is-a object (yes, sort of confusing) look at the extra creditclass Animal(object): pass## Dog is-a animal, it has-a nameclass Dog(Animal): def __init__(self, name): ## ?? self.name = name## Cat is-a animal, it has-a ... 阅读全文
posted @ 2013-03-22 22:42 赵乐ACM 阅读(176) 评论(0) 推荐(0) 编辑