I have a couple of questions. The code below doesn\'t run because I\'ve specified three arguments to the __init__
method and the make_dog
function retu
As written, the class can't unpack your dictionary. You could replace this line
d = Dog(make_dog())
With
user_dog = make_dog()
d = Dog(user_dog['name'], user_dog['colour'], user_dog['sex']
That said, it's kind of messy. You probably shouldn't even bother with the dictionary in the first place. And you should probably create the dog object within the function.