Consider:
class Base():
def foo():
...
class A(Base):
def bar():
...
class MyBase(Base):
def zee():
...
def bar():
...
class MyA(MyBase, A):
def zee():
...
Now I want to introduce MyA class which has the property of both MyBase and also A. Is the way I inroduced MyA correct?
Base ___
| Possible other ancestors
| |
MyBase A
| |
MyA-----
Note both MyBase and A are derived from Base, So it refers to Base from different paths. I would like to know if there is any considerations or alternative approaches.
For example while bar is introduced in A and also MyBase, if I don't have a bar in MyA, the bar of Mybase is considered the overridden method of A for MyA?!! How could I avoid it? unless I change MyBase method name.