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 Inheritance Complex Relationships

Kohei Ashida
Kohei Ashida
4,882 Points

What does it mean that "so we have our Thief attribute, we can't set the sneaky or that kind of stuff."?

Does this explanation mean "sneaky" has been already set as an attribute in class "Thief" so the same object cannot be set in the parent class; Character to avoid name collision?

1 Answer

Steven Parker
Steven Parker
231,269 Points

He's explaining the impact of removing the "__init__" method just moments before. It previously allowed "sneaky" to be passed as an argument when creating an instance; but without it, "sneaky" is always set to True.

But he also mentioned that features lost here will be restored later on, as you will see in the next video.

Kohei Ashida
Kohei Ashida
4,882 Points

Thanks a lot, Steven! I misunderstood what he's talking about. Now I know it's about initializing an instance of Thief class.