class Person:
def __init__(self,name,gender):
self.name=name
self.gender=gender
class Student(Person):
def __init__(self,name,gender,score):
super(Student, self).__init__(name,gender)
self.score=score
class Teacher(Person):
def __init__(self,name,gender,subject):
super(Teacher, self).__init__(name, gender)
self.subject=subject
class SkillMixin:
def __init__(self,skill):
self.skill=skill
class BasketballMixin(SkillMixin):
def __init__(self,skill,basketball):
super(BasketballMixin, self).__init__(skill)
self.basketball=basketball
class FootballMixin(SkillMixin):
def __init__(self,skill,football):
super(FootballMixin, self).__init__(skill)
self.football=football
class BasStudent(Student,BasketballMixin):
def __init__(self,name,gender,score,skill,basketball):
super(BasStudent, self).__init__(name,gender,score)
def getskill(self):
print("我叫 %s,我会打%s "%(self.name,self.basketball))
a=Student('jiji','boy',13)
b=BasketballMixin('high','篮球',)
c=BasStudent.getskill()
print(c)