Introduction Two important terms to understand when learning Python and OOP (object-oriented programming) are inheritance and polymorphism. Inheritance Inheritance establishes a relationship between two classes - parent (superclass) and child (subclass). Child classes keep the attributes and methods of their parent, whilst also add ing new attributes or methods of its own. Furthermore, the child class can also override methods of its parent. Below shows an example: class NetDevice(object):
Get the full article
Sign up now to read in full and get access to the full library of premium articles.
Sign Up NowAlready have an account? Sign in