类的多重调用怎么报错,如下错误:
class person(object):
def __init__(self,name,age,gender):
self.name=name
self.age=age
self.gender=gender
class skillmixin(object):
def __init__(self,skillname):
self.skillname=skillname
class student(person):
def __init__(self,name,age,gender,score):
super(student,self).__init__(name,age,gender)
self.score=score
class teacher(person):
def __init__(self,name,age,gender,coures):
super(teacher,self).__init__(name,age,gender)
self.coures=coures
class basketballmixin(skillmixin):
def __init__(self,skillname,basketballlevel):
super(basketballmixin,self).__init__(skillname)
self.basketballlevel=basketballlevel
class footballmixin(skillmixin):
def __init__(self,skillname,footballlevel):
super(footballmixin,self).__init__(skillname)
self.footballlevel=footballlevel
class studenthobby(student,basketballmixin):
def __init__(self,skillname,basketballlevel):
super(studenthobby,self).__init__(name,age,gender,score,skillname,basketballlevel)
print('I am a student being good at playing basketball,my name is %s'%s,self.name,self.basktballlevel)
class teacherhobby(teacher,footballmixin):
def __init__(self,skillname,footballlevel):
super(teacherhobby,self).__init__(name,age,gender,coures,skillname,footballlevel)
print('I am a teacher being good at playing football,my name is %s'%s,self.name,self.footballlevel)
s=student('liyawang',15,'female',90)
t=teacher('jake',48,'male','comprehensive')
sk=basketballmixin('basketball','junior')
tk=footballmixin('foottball','medium')
#sh=basketballmixin(sk,'junior')
#th=footballmixin(tk,'medium')
studenthobby(s,sk)
#teacherbobby(t,th)