-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Mastering Python Design Patterns
By :

In many situations, we need a way to easily take a snapshot of the internal state of an object, so that we can restore the object with it when needed. Memento is a design pattern that can help us implement a solution for such situations.
The Memento design pattern has three key components:
Memento shares many similarities with the Command pattern.
The memento pattern can be seen in many situations in real life.
An example could be found in the dictionary we use for a language, such as English or French. The dictionary is regularly updated through the work of the academic experts, with new words being added and other words becoming obsolete. Spoken and written languages evolve and the official dictionary has to reflect that...
Change the font size
Change margin width
Change background colour