多类继承错误:TypeError: Cannot create a consistent method resolution(Multi class inheritance error: typeerror: cannot create a consistent method resolution)

TypeError: Cannot create a consistent method resolution无法创建一致的方法解析

原因是继承顺序错了

若B继承A,C要继承A和B,则需将B写在前面,A写在后面

class C(B, A):

  pass

详情参考:

 https://blog.csdn.net/qq_31362767/article/details/99192735

————————

TypeError: Cannot create a consistent method resolution无法创建一致的方法解析

The reason is that the inheritance order is wrong

If B inherits a and C inherits a and B, B should be written before and a should be written after

class C(B, A):

pass

For details, refer to:

 https://blog.csdn.net/qq_31362767/article/details/99192735