Skip to content

Conversation

@jake-bewick
Copy link

No description provided.

my_group =
my_group = {
'Jill' : {
'relationships': {
Copy link

Choose a reason for hiding this comment

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

Interesting method for generalizing relationships of any type. Will be very exstensible in the future. However, this you will run into problems when a person has more than one relationship with a single person (e.g. Zalika-friend, Zalika-cousin).

'job' : ['biologist'],
'age' : 26
},
'Zalika' : {
Copy link

Choose a reason for hiding this comment

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

Nice that you use a person's name as a unique key.

'Jill' : 'friend',
'Nash' : 'tenant'
},
'job' : ['artist'],
Copy link

Choose a reason for hiding this comment

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

Allowing for a person to have zero or more than one job is also quite forward-thinking. Why not use a set though? (it's unlikely that a person will have multiple jobs with the same name)

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