I am new to python programming, below is the example of parent,child classes,There are two direct super classes (i.e. bases) of C: A and B. A comes before B, so one would naturally think that the super class of C is A. However, A inherits its attribute a from T with value a=0: if super(C,c) was returning the superclass of C, then super(C,c).a would return 0 but its won't?
Could you please help me to understand why its returning 2.why not 0
>>> class T(object):
... a = 0
>>> class A(T):
... pass
>>> class B(T):
... a = 2
>>> class C(A,B):
... pass
>>> c = C()
>>>super(C,c).a
2
Thanks, Hema