March 2022
Intermediate to advanced
606 pages
12h 25m
English
In this chapter, we will cover the command pattern. Using this design pattern, we can encapsulate an operation, such as copy and paste, as an object. The command pattern is also great for grouping multiple commands. It's useful for implementing macros, multilevel undoing, and transactions. Throughout our discussions, we will learn about the idea of treating an operation as an object and use this command mindset to handle application transactions.
We will discuss the following:
The code files for this chapter can be accessed through this link: https://github.com/PacktPublishing/Advanced-Python-Programming-Second-Edition/tree/main/Chapter25 ...