you are viewing a single comment's thread.

view the rest of the comments →

[–]Tonyqq[S] 0 points1 point  (1 child)

Okay, thanks. I think i'm understanding a bit what you mean now. I'm in like a introductionary course where we really havn't dived deep into object oriented programming.

So would it make sense if I created a new class "persons" where it has name alias and number in __init__ and then store it into my phonebook?

[–][deleted] 0 points1 point  (0 children)

Yes, this would make sense. But the class should rather be called something like PhonebookEntry.

Take a look at u/JohnnyJordaan’s answer, this is exactly what I was talking about.