I have a class structure like
class A:
def method1(self):
return 1
class B:
def method2(self):
return 2
class C(A,B):
def method3(self):
return self.method1()+self.method2()
The Classes A and B provide functionality which class C gathers and enriches with some wrappers. Now it happens that I need a similar class C2 which is derived from a different implementation A2 instead of A: class C2(A2, B) with the same method3.
How would you realize such a design (C can derive from different implementation classes)?
If it has to do with advanced Python programming (meta-classes?) an example would be appreciated :)