class Person(object):
def __init__(self, name, gender):
self.name = name
self.gender = gender
class Skillmixin(object):
def __init__(self,skill):
self.skill=skill
class Teacher(Person):
def __init__(self, name, gender, course):
super(Teacher, self).__init__(name, gender)
self.course = course
class FootballMixin(Skillmixin):
def __init__(self,skill,sex):
super(FootballMixin,self).__init__(skill)
self.sex=sex
class Football_teacter(Teacher,FootballMixin):
def __init__(self,name,gender,course,skill,sex,color):
super(Football_teacter,self).__init__(name, gender, course)
# super(Teacher,self).__init__(skill,sex)
self.color=color
s = Football_teacter('Bob', 'golor', '数学','ccc','足球','hot')
print(s.color)
print(s.name)
print(s.gender)
print(s.course)
print(s.skill)
print(s.sex)
class P(object):
def __init__(self,name):
self.name = name
class Skill(object):
def __init__(self,skill):
self.skill = skill
class F(Skill):
def __init__(self,skill):
super(F,self).__init__(skill)
#self.skill = 'football'
class B(Skill):
def __init__(self,skill):
super(B,self).__init__(skill)
#self.skill = 'basketball'
class S(P, B):
def __init__(self,name,skill):
P.__init__(self,name)
B.__init__(self,skill)
print ('{}打{}'.format(self.name,self.skill))
class T(P, F):
def __init__(self,name,skill):
P.__init__(self,name)
F.__init__(self,skill)
print ('{}打{}'.format(self.name,self.skill))
S('student','basketball')
T('teacher','football')