摘要: class Foo: def __init__(self): self.name="wes" def __del__(self): print("in __del__") def __delattr__(self, item): print("in delattr") f1=Foo() print(f1.name) prin... 阅读全文
posted @ 2018-11-15 16:44 986428528 阅读(111) 评论(0) 推荐(0)
摘要: class MyProperty: def __init__(self,func): self.func=func #self.func=area def __get__(self, instance, owner): print("in __get__") if instance is None: ... 阅读全文
posted @ 2018-11-15 14:38 986428528 阅读(101) 评论(0) 推荐(0)