Table of Contents

About

Object - Inheritance in Python

Management

Creation

Class keyword

class DerivedClass(BaseClass)

where:

  • the derived class is the new class
  • and the base class is the class from which that new class inherits.

Dynamic

See Python Type - Dynamic Class

Access

To directly access the attributes or methods of a superclass, use the built-in super function.

class DerivedClass(Base):
   def some_method(self):
       super(DerivedClass, self).methode()

where:

  • meth() is a method from the base class.