class Person:
def init(self,n,s):
self.name=n
self.sex=s
print "Person"
class Student(Person):
def init(self,n,s,j):
self.job=j
print "test"
super(Person,self).__init__(n,s)
print "Student"
s=Student("janie","woman","student")
super那条语句,哪里有问题,为什么报错
F:\python\python.exe F:/python程序/test.py
Traceback (most recent call last):
File "F:/python程序/test.py", line 17, in
s=Student("janie","woman","student")
File "F:/python程序/test.py", line 13, in init
super(Person,self).__init__(n,s)
TypeError: must be type, not classobj
test
Process finished with exit code 1