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

restart #740

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

restart #740

wants to merge 2 commits into from

Conversation

Feristis
Copy link

No description provided.

app/main.py Outdated
Person(person["name"], person["age"])

for person in people:
if "wife" in person and person["wife"] is not None:

Choose a reason for hiding this comment

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

Suggested change
if "wife" in person and person["wife"] is not None:
if person.get("wife")

app/main.py Outdated
Comment on lines 13 to 14
for person in people:
Person(person["name"], person["age"])

Choose a reason for hiding this comment

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

You can save person list to a variable and return this variable in the end of the function

app/main.py Outdated
wife = Person.people[person["wife"]]
Person.people[person["name"]].wife = wife

if "husband" in person and person["husband"] is not None:

Choose a reason for hiding this comment

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

Suggested change
if "husband" in person and person["husband"] is not None:
if person.get("husband")

Copy link

@EdAlekseiev EdAlekseiev 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