Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Object-Oriented Python Dice Roller Giving a Hand

Marcus Schumacher
Marcus Schumacher
16,616 Points

What is the point of passing *args and **kwargs in the __init__ of Hand and YatzyHand classes?

I don't see us using them anywhere, so why are we including them as parameters?

2 Answers

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,457 Points

In this case, there is zero need for the *args and **kwargs to be included.

In general they’re included to pass arguments through child class and on to the parents class. Since Hand does nothing with them, there is no need for YatzyHand to pass them along. I might argue that having them there is might be harmful since extra arguments would we silently swallowed up.

Post back if you need more help. Good luck!!!

Thank you for the explanation. It had me confused as well