In c++ the object of derived class can access method of base class like this.
class a:
def save(self):
print('a executed')
class b(a):
def save(self):
print('b executed')
class c(a):
def save(self):
print('c executed')
class d(b, c):
def save(self):
print('d executed')
obj = d()
Is this possible in python that obj
of class d
can access the method of class c
. I'm not discussing about use of super()
.
e.g.,
if some syntax like this
obj.c.save() #not correct its just my thinking
then output should be:
c executed