摘要: 对象.属性(新的,类里没有self定义的)=>触发 阅读全文
posted @ 2015-09-15 22:53 shinymood 阅读(527) 评论(0) 推荐(0) 编辑
摘要: class.__dict__:一个字典,里面是该类所有属性object.__dict__:一个字典,里面是该对象所有属性两者的__dict__是完全不一样的东西class a: ab = 1 def __init__(ab): self.ab = ab sel... 阅读全文
posted @ 2015-09-15 22:52 shinymood 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 文档:A value associated with an object which is referenced by name using dotted expressions. For example, if an object o has an attribute a it would be ... 阅读全文
posted @ 2015-09-15 22:30 shinymood 阅读(121) 评论(0) 推荐(0) 编辑