class OldboyPeople:
school = "oldboy"
def __init__(self, name, age, gender):
self.name = name
self.age = age
self.gender = gender
def f1(self):
print('1111111')
class Student(OldboyPeople):
def __init__(self, name, age, gender, stu_id, course):
super(Student, self).__init__(name, age, gender)
self.stu_id = stu_id
self.course = course
def choose(self):
print('%s 正在選課' % self.name)
def f1(self):
print("22222")
stu1 = Student("艾利克斯", 73, 'male', 1001, "python全棧開放")
stu1.f1()
class A:
def test(self):
super().test()
class B:
def test(self):
print('from B')
class C(A, B):
pass
c = C()
print(C.mro())
c.test()
obj = A()
obj.test()
class A:
def test(self):
print('A---->test')
super().aaa()
class B:
def test(self):
print('B---->test')
def aaa(self):
print('B---->aaa')
class C(A, B):
def aaa(self):
print('C----->aaa')
c = C()
print(C.mro())
c.test()
"""
A---->test
B---->aaa
"""