On Apr 4, 12:22 pm, [EMAIL PROTECTED] wrote: > Hello, I have been trying to call the super constructor from my > derived class but its not working as expected. See the code: > > class HTMLMain: > def __init__(self): > self.text = "<HTML><BODY>"; > print(self.text); > def __del__(self): > self.text = "</BODY></HTML>"; > print(self.text); > > class NewPage(HTMLMain): > def __init__(self): > print 'derive2 init' > super(NewPage, self).__init__(); > > N = NewPage(); > del N > > And here's the error message I get:
The error message is trying to tell you that 'super' should be used with new style classes. So, class HTMLMain: should be class HTMLMain(object): -- Hope this helps, Steven -- http://mail.python.org/mailman/listinfo/python-list