In class object def lala self return In class def lala self super self

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
In [1]: class A(object):
...: def lala(self):
...: return 5
...:
In [2]: class B(A):
...: def lala(self):
...: x = super(B, self).lala()
...: return x * 2
...:
In [3]: B().lala()
Out[3]: 10