Skip to content

Commit a06231e

Browse files
committed
Add comment that mypy detects non existent attribute.
1 parent 294c6b7 commit a06231e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎sprint5-prep-exercises/add_is_adult.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ def get_address(person: Person) -> str:
2121
imran = Person("Imran", 22, "Ubuntu")
2222

2323
print(imran.name)
24-
print(is_adult(imran))
24+
print(is_adult(imran))
25+
print(get_address(imran))# Checked this with mypy and gave an error, as "Person" has no attribute "address"

0 commit comments

Comments
 (0)