如何理解 super(Teacher, self)这句?
class Teacher(Person): def __init__(self, name, gender, course): #Person.__init__(self, name, gender)也可 #super(Teacher, self)是表示 Teacher 的父类?self参数如何理解? super(Teacher, self).__init__(name, gender) self.course = course
super(Teacher, self).__init__(name, gender) 也可写为
Person.__init__(self, name, gender)
所以super(Teacher, self)是想引用到 Teacher 的父类?self参数如何理解?