design pattern quick reference prototype prototype_ py from abc import abcmetaabstractmethod class prototype(metaclass=abcmeta)@abstractmethod def clone(self)pass concrete py from prototype_ import prototype from copy import deepcopy class concrete(prototype)def clone(self)return deepcopy(selffactory factory py import abc class abstractfactory(object)__metaclass__ abc abcmeta @abc abstractmethod def make_object(self)return class concretefactory(abstractfactory)def make_object(self)do something return concreteclass(