In my example C1 class and C2 class both inherit from Base class. In the Base::run(self) method I am calling self.__run1 and self.__run2 methods that are overloaded in C1 and C2.
I can't see a way to execute the C1::__run1 and C2::__run2 methods.
class Base(object):
def __run1(self):
pass
def __run2(self):
pass
def run(self):
self.__run1()
self.__run2()
class C1(Base):
def __run1(self):
print("C1 run1")
class C2(Base):
def __run2(self):
print("C2 run2")
o1 = C1()
o2 = C2()
o1.run()
#how to make it return C1 run1?
o2.run()
#how to make it return C2 run2?