Python - Inheritance vs Polymorphism

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 adding new attributes or methods of its…

Read More

Python - Creational Design Patterns

Introduction Design patterns offer solutions to common software design problems. When it comes to OOP (object-oriented programming), design patterns are more focused on solving the problems of object generation and interaction, rather than the larger scale problems of overall software architecture.[1] Gang of Four In 1994, four authors --…

Read More