Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solution #868

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

solution #868

wants to merge 3 commits into from

Conversation

rozovas
Copy link

@rozovas rozovas commented Nov 25, 2023

No description provided.

app/main.py Outdated
def __init__(self, name: str, age: int) -> None:
self.name = name
self.age = age
self.__class__.people[self.name] = self

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.__class__.people[self.name] = self
self.people[self.name] = self

app/main.py Outdated
Comment on lines 13 to 14
if "wife" in person:
if person["wife"] in Person.people:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use and statement

app/main.py Outdated
Comment on lines 16 to 17
if "husband" in person:
if person["husband"] in Person.people:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use and statement

app/main.py Outdated
# write your code here
pass
person_list = [Person(person["name"], person["age"]) for person in people]
for i, person in enumerate(people):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i is not a descriptive variable name. use index instead

@rozovas rozovas requested a review from pavlejviki November 30, 2023 11:19
Copy link

@pavlejviki pavlejviki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants