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 #1635

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Darya-Savchenko
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Great job on implementing the Person class and the create_person_list function! 🎉 Your code meets most of the task requirements and constraints. While there are a few minor issues related to dictionary access, list comprehension, and the handling of relationships, these do not significantly impact the functionality. Keep up the good work, and consider the feedback for future improvements! 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

@@ -1,8 +1,23 @@
class Person:
# write your code here
pass
people = {}

Choose a reason for hiding this comment

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

Using a class-level dictionary people to store instances by name can lead to issues if multiple people have the same name. Consider using unique identifiers for each person.

Comment on lines +19 to +21
person_instance.wife = Person.people[person["wife"]]
elif "husband" in person and person["husband"] is not None:
person_instance.husband = Person.people[person["husband"]]

Choose a reason for hiding this comment

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

The code assumes that the spouse (wife/husband) is already created and present in the Person.people dictionary. Ensure that the input list people is ordered or structured such that all referenced spouses are created before they are assigned.

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.

2 participants