How do I change a superClass attribute that's inside of a subClass?
问题 When I define the __init__ of ProductionWorker , I also need to set the attributes of EmployeeClass . I entered "Bob" and "001121" as a test and it works but I need to be able to change it in my main from the input of the user. class ProductionWorker(EmployeeClass): SHIFT = {1: "day shift", 2: "night shift"} def __init__(self, shift=None, hourly_pay=None): EmployeeClass.__init__(self, "Bob", "001121") self.__shift = shift self.set_shift = shift self.__hourly_pay = hourly_pay self.set_hourly