Implementing the prototype pattern
The prototype pattern is useful when you need to create objects based on an existing object using the cloning technique. As you may have guessed, the idea is to use a copy of that object's complete structure to produce the new object. We will see that this is almost natural in Python because we have a copy feature that helps greatly in using this technique. In the general case of creating a copy of an object, what happens is that you make a new reference to the same object, a method called a shallow copy. But if you need to duplicate the object, which is the case with a prototype, you make a deep copy.
Sometimes, we need to create an exact copy of an object. For instance, assume that you want to create an application for storing, sharing, and editing presentation and marketing content for products promoted by a group of salespeople. Think of the popular distribution model called direct selling or network marketing, the home-based activity...