I have the following code:
class TestA(object):
def __init__(self, *args):
super(TestA, self).__init__()
print 'TestA'
class TestB(object):
def __init__(self, my_var=None):
super(TestB, self).__init__()
print 'TestB', my_var
class TestC(object):
def __init__(self, my_var=None):
super(TestC, self).__init__()
print 'TestC', my_var
class TestD(TestB, TestA, TestC):
def __init__(self):
print 'TestD'
super(TestD, self).__init__("Hello World")
And the output is
TestD
TestC None
TestA
TestB Hello World
I would expect to have :
TestD
TestB Hello World
TestA
TestC Hello World
It looks super get only the first parent. When I have read one the answer in stackoverflow I thought it would do what I have expected. What's wrong in my code or my understanding?
Thank you in advance.