Добавил геттер
This commit is contained in:
parent
85673af84f
commit
a00f2a435e
1 changed files with 3 additions and 0 deletions
3
app.py
3
app.py
|
|
@ -12,5 +12,8 @@ class Teacher(Person):
|
||||||
def __init__(self, name, age):
|
def __init__(self, name, age):
|
||||||
super().__init__(name, age)
|
super().__init__(name, age)
|
||||||
|
|
||||||
|
def getter(self):
|
||||||
|
return self.name
|
||||||
|
|
||||||
|
|
||||||
print("Привет!")
|
print("Привет!")
|
||||||
Loading…
Add table
Add a link
Reference in a new issue