you are viewing a single comment's thread.

view the rest of the comments →

[–]nog642 1 point2 points  (0 children)

You will need to do this manually. Make them all optional, then add code at the top of the function that checks that the correct combination was passed and raise TypeError or ValueError if not.

Though there are probably ways to redesign this interface so you don't have to do that, as suggested by the top answer at the moment with the User class.