Answer the question
In order to leave comments, you need to log in
Inheritance, __init__ method?
there is a class Person and there is a child class Manager.
class Person:
def __init__(self, name, job, salary):
self.name = name
self.job = job
self.salary = salary
class Manager(Person):
def __init__(self, name, salary):
super().__init__(name, "manager", salary)
super().__init__(name, "manager", salary)
from Person.__init__(name, "manager", pay)
? Answer the question
In order to leave comments, you need to log in
The shape Person.__init__(name, "manager", pay)
is a legacy of Python 2.5 and is deprecated and deprecated.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question