Skip to content

Commit 664b191

Browse files
committed
Fix bug
1 parent 611c259 commit 664b191

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

prep_exercise/9_inheritance.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ def get_full_name(self) -> str:
3333

3434

3535
person2 = Parent("Elizaveta", "Alekseeva")
36-
print(person2.get_name()) # works because it is the Parent class.
36+
print(person2.get_name()) # works because it is in the Parent class.
3737
print(person1.get_full_name())
38-
# print(person2.get_full_name()) #get_full_name is defined only in child
39-
# person2.change_last_name("Tyurina") #change_last_name is defined only in child not in parent
38+
# print(person2.get_full_name()) # crashes the program as get_full_name is defined only in child
39+
# person2.change_last_name("Tyurina") # crashes the program as change_last_name is defined only in child not in parent
4040
print(person2.get_name())
4141
# print(person2.get_full_name()) #get_full_name is defined only in child not in parent
4242

0 commit comments

Comments
 (0)