super in python 2.7

super in python 2.7

Your base class people should be derived from the object class, to make it a new-style class, which will allow super() to work.

You should then use super as:

super(student, self).__init__(n,a,w)

Old-style classes behave quite differently, and I dont understand them

super in python 2.7

Leave a Reply

Your email address will not be published.