The following code raises a TypeError :
>>> class X:
... def a(self):
... print "a"
...
>>> class Y(X):
... def a(self):
... super(Y,self).a()
... print "b"
...
>>> c = Y()
>>> c.a()
Traceback (most recent call last):
File "", line 1, in
File "", line 3, in a
TypeError: super() argument 1 must be type, not classobj
If , however I replace class X with class X(object) , the same code will work . I am using python 2.5.2 .What's the explanation for this ?