摘要: ## 特殊方法 ```python class Foo(object): def __getattr__(self, item): print(item) return '__getattr__' obj = Foo() print(obj.method) # 输出: method __getatt 阅读全文
posted @ 2023-08-15 21:09 f_carey 阅读(10) 评论(0) 推荐(0) 编辑
摘要: # 继承类中执行优先级 [toc] ## 1 方法 ```python class Base(): def foo2(self): print('base foo1') def foo1(self): print('base foo1') self.foo2() class Foo(Base): d 阅读全文
posted @ 2023-08-15 21:03 f_carey 阅读(13) 评论(0) 推荐(0) 编辑