Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Object-Oriented Python Inheritance Multiple Superclasses

Andras Andras
Andras Andras
7,941 Points

Why do not we need to use super() for Character class?


Just a simple question. I did not get it. Could you please explain why do not we need to use super() for Character class but Agile and Sneaky require super().

So, because that is the final class that initialized? All final initialized can go without super(). Total confusion.

2 Answers

Yu-Che Hung
Yu-Che Hung
Courses Plus Student 10,607 Points

But why Agile and Sneaky require super(). They are not subclasses of Character, right?

Anthony Albertorio
Anthony Albertorio
22,587 Points

This is because Character class is the class where all inheritance ends (if you don't count the implicit inheritance from the master object class all classes inherit from). So since Character is the most base class and doesn't inherit from anywhere, then it doesn't take a super() method call from elsewhere.

Hope this helps.