标签:
_subclasshook_
后浪云Python教程:python抽象基类之_subclasshook_方法
Python的鸭子特性(duck typing) Python中自定义的类只要实现了某种特殊的协议,就能赋予那种行为,举一个简单的例子: class A: &n……
2022-02-17 后浪云
0
0