Skip to content

Latest commit

 

History

History

0x0A-python-inheritance

img

Inheritance in python

About

Inheritance is a powerful feature of object-oriented programming (OOP) that allows a class to inherit attributes and methods from a parent class. This allows you to create a new class that is a modified version of an existing class, without having to rewrite the entire class from scratch. Other than saving you a lot of time and effort, it also helps you to avoid duplication of code. Stay hooked as we dive into how to implement inheritance in python.

Resources

  1. Inheritance
  2. Multiple inheritance
  3. Inheritance in python
  4. Learn to program 10: Inheritance
  5. Youtube
  6. Google

Learning objectives

At the end of the project, you are expected to be able to explain to anyone without the help of Google the following concepts

  • What is a superclass, baseclass or parentclass
  • What is a subclass
  • How to list all attributes and methods of a class or instance
  • When can an instance have new attributes
  • How to inherit class from another
  • How to define a class with multiple base classes
  • What is the default class every class inherit from
  • What is the default class every class inherit from
  • Which attributes or methods are available by heritage to subclasses
  • What is the purpose of inheritance
  • What are, when and how to use isinstance, issubclass, type and super built-in functions

Quizes

Quiz