Python Design Patterns
After going through https://python-patterns.guide/, I decide to use some simple, contrived Python programs to get familiar with several Python-compatible patterns. In this article, I'll show four design patterns that are fully compatible with Python and very easy to use: the observer pattern, the strategy pattern, the decorator pattern and the flyweight pattern. The observer pattern The observer pattern is a behavioral design pattern where an object, known as the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes. ...