Skip to content

Commit 7c3f71f

Browse files
authored
Update prototype.py
1 parent 666ef63 commit 7c3f71f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

patterns/creational/prototype.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def __init__(self, value: str = "default", **attrs: Any) -> None:
3131

3232
def clone(self, **attrs: Any) -> None:
3333
"""Clone a prototype and update inner attributes dictionary"""
34+
# Python in Practice, Mark Summerfield
3435
# copy.deepcopy can be used instead of next line.
3536
obj = self.__class__(**self.__dict__)
3637
obj.__dict__.update(attrs)

0 commit comments

Comments
 (0)