This question is derive from the following question, let's say class B
extends class A
class A(object):
def do_work(self):
print 123
class B(A):
def do_work(self):
super(B,self).do_work() # versus the next statement
super(A,self).do_work() # what's the difference?
will call the
do_work
function as seen by the parent class ofB
- that is,A.do_work
.will call the
do_work
function as seen by the parent class ofA
- that is,object.do_work
(which probably doesn't exist, and thus would likely raise an exception).