I have two classes A and B and A is base class of B.
I read that all methods in Python are virtual.
So how do I call a method of the base because when I try to call it, the method of the derived class is called as expected?
>>> class A(object):
def print_it(self):
print 'A'
>>> class B(A):
def print_it(self):
print 'B'
>>> x = B()
>>> x.print_it()
B
>>> x.A ???
Two ways:
Using super: