Clone a prototype and update inner attributes dictionary
(self, **attrs: Any)
| 32 | self.__dict__.update(attrs) |
| 33 | |
| 34 | def clone(self, **attrs: Any) -> Prototype: |
| 35 | """Clone a prototype and update inner attributes dictionary""" |
| 36 | # Python in Practice, Mark Summerfield |
| 37 | # copy.deepcopy can be used instead of next line. |
| 38 | obj = self.__class__(**self.__dict__) |
| 39 | obj.__dict__.update(attrs) |
| 40 | return obj |
| 41 | |
| 42 | |
| 43 | class PrototypeDispatcher: |