March 2022
Intermediate to advanced
606 pages
12h 25m
English
We now cover the Chain of Responsibility design pattern, which should be used, as we will see, when we do not know the number and type of requests/events we would need to support. While this may seem vague, this pattern is useful among a wide range of use cases, such as event-based systems, purchase systems, and shipping systems.
In this chapter, we will learn what the Chain of Responsibility pattern is, its benefits, and—as always—how to implement it in a practical Python example. We will discuss the following topics:
The code files for this chapter can be accessed through this ...