Blake Lambert dd9ce2bc2a Added information on inheritance in Python (#26572)
* Added information on inheritance in Python

* Formatting changes
2019-02-22 03:33:16 -05:00

651 B

title
title
Inheritance

Inheritance

Because Python is an opject oriented programing language, classes created in Python are able to inherit attributes and methods from other classes. For example:

class ParentClass():
    pass
    
class ChildClass(ParentClass):
    pass
    

In the very basic example, the ChildClass class will inherit from ParentClass and use code defined under that class.

Python is also able to support multiple inheritance, so child classes can inherit from multiple classes.

More Information: