class Test(object):
def __init__(self, name, myclass):
self.name = name
self.myclass = myclass
def get_parents(self):
? self.myclass.super() ?
return parent
obj = Art # another class
testobj = Test('testA', obj)
print(testobj.get_parents())
The parent class of Test can be obtained using super().
How to get the parent classes of Art inside Test class? (Say Art is inherited from Artists and Artists from Base. We need to be able to get Artists and Base as parents.)