Observer Pattern: Understanding, Implementing using python
Three examples of implementing observer pattern in python
The Observer Pattern is a design pattern in software engineering where an object, called the subject, maintains a list of its dependents, called observers, and notifies them automatically of any changes to its state. The observer pattern is used to implement a publish/subscribe communication model, where the subject acts as the publisher and the observers act as subscribers. In this article, we’ll explain what the observer pattern is, why it’s useful, and how to implement it in Python.
What is Observer Pattern?