+2 votes
in Class 12 by kratos

What is the significance of super method? Give on example of the same.

1 Answer

+1 vote
by kratos
 
Best answer

super ( ) function is used to call base class methods which have been extended in derived class.

Example :

class GradStudent ( Student):

def init (self) :

super (GradStudent, self). init ( )

self. subject = ” ”

self. working = ” ”

def readGrad (self) :

Call readStudent method of parent class super (GradStudent, self).

readStudent ( )

...