Search⌘ K

The Super Function

Explore the super() function in Python to access parent class properties, methods, and initializers within child classes. Understand how super() improves code manageability and structure in inheritance by removing the need to explicitly name the parent class.

What is the super() function?

The use of super() comes into play when we implement inheritance. It is used in a child class to refer to the parent class without explicitly naming it. It makes the code more manageable, and there is no need to know the name of the parent class to access its attributes.

Note: Make sure to add parenthesis at the end to avoid a compilation error.

Use cases of the super()

...