📜  如何在python两个类中调用超类构造函数 - Python代码示例

📅  最后修改于: 2022-03-11 14:47:04.031000             🧑  作者: Mango

代码示例1
from Employee import Employee
from Person import Person

class Manager(Person, Employee):

    def __init__(self,lname, fname, phone_number, addy, start_date, salary, department, direct_reports):
        Employee.__init__(self,start_date,salary)
        Person.__init__(self,lname,fname,phone_number, addy)
        self.department = department
        self.direct_reports = direct_reports