Mega Code Archive

 
Categories / Python Tutorial / Class
 

When using the keyword super, and that is why the super() built-in function was eventually added to Python, so you could do the corr

class P(object):     def __init__(self):         print "calling P's constructor" class C(P):         def __init__(self):             super(C, self).__init__()             print "calling C's constructor"