FAQ: Learn Python: Inheritance and Polymorphism - Inheritance

This community-built FAQ covers the “Inheritance” exercise from the lesson “Learn Python: Inheritance and Polymorphism”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Computer Science

FAQs on the exercise Inheritance

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!


Why when we instance class we use parentheses but when we inheritance the class we do not even if the base class has a init_ method with more then self parameter?

Remember that our class acts like a blueprint for creating new objects? Calling a class with parentheses e.g. MyClass(args) is the way we create a new object and then use our class to add all the useful attributes to this object (this is the case for any classes using type as a metaclass).

For inheritance we’re not interested in what the the first class (the blueprint) creates, we’re interested in the class itself. So for inheritance we can just inherit directly from the class object.

Many thanks for the clear explanation.