We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 666ef63 commit 7c3f71fCopy full SHA for 7c3f71f
patterns/creational/prototype.py
@@ -31,6 +31,7 @@ def __init__(self, value: str = "default", **attrs: Any) -> None:
31
32
def clone(self, **attrs: Any) -> None:
33
"""Clone a prototype and update inner attributes dictionary"""
34
+ # Python in Practice, Mark Summerfield
35
# copy.deepcopy can be used instead of next line.
36
obj = self.__class__(**self.__dict__)
37
obj.__dict__.update(attrs)
0 commit comments