Is it possible to do partial inheritance with Python?

后端 未结 4 1327
猫巷女王i
猫巷女王i 2020-12-15 05:34

I\'m creating a class (class0) in Python that is a currently based off of one class (class1); however, I\'d like to inherit from another class as well (class2). The thing ab

4条回答
  •  悲&欢浪女
    2020-12-15 06:00

    create another base class implementing this one method and make class2 and class1 both inherit this class

提交回复
热议问题