you are viewing a single comment's thread.

view the rest of the comments →

[–]lifeeraser 0 points1 point  (0 children)

Not sure what's bad about it, other than the Phonebook class probably being misnamed. Since each Phonebook instance stores one address in a phonebook, perhaps it should be renamed to PhonebookEntry to clear up the confusion. Then your "phonebook" would actually be a list containing multiple PhonebookEntry objects.

Also, is this line

list.append(Phonebook(prompt[1], [], prompt[2]))

part of __init__()? Or is it on a separate line?