Object Oriented Python
Python’s popularity is in part due to its simplicity. However, unlike many other “simple” languages, Python has many advanced features that, when used pragmatically, facilitate the expression of complex concepts in a concise way. Knowing some of these features is necessary, not just to level up as a developer, but because they are used often in open-source libraries.
One such features is python’s data model (AKA class model). This is where Python’s object-oriented (oo) features can really shine for making intuitive, simple APIs. The behavior of classes is controlled by dunder (double underscore methods, or “magic” methods). In this module we will learn the basics of “light handed” object-oriented design and see how to use a few of the more common dunder methods.
Objectives
In this module we will learn about:
- Classes, instances, inheritance
- Dunder methods
- Examples of effective object oriented design