Is it possible to choose which base class to inherit from at the time of object creation? Basically, different objects of the same class will make the class inherit from different base classes depending on the initialization parameters.
Suppose I have 3 classes, ClassA, ClassB and ClassC:
class ClassA():
pass
class ClassB():
pass
class ClassC():
def __init__(self,x):
self.x=x
Depending on the value of x, ClassC should either inherit from ClassA or ClassB.
ClassCobj = ClassC(x=value)
# if value<10, ClassC should inherit from ClassA
# if value>10, ClassC should inherit from ClassB