Just
class JapanesePerson(Person):
def say_hello(self):
print("こんにちは")
If you don't write a new __init____init__
, it will automatically uses the old one.
Or
class JapanesePerson(Person):
def __init__(self, name, age):
Person.__init__(self, name, age)
If you would do something else in __init____init__
.
Using super() is usually the best practice.