|
def clone(self, **attrs: Any) -> None: |
|
"""Clone a prototype and update inner attributes dictionary""" |
|
# Python in Practice, Mark Summerfield |
|
# copy.deepcopy can be used instead of next line. |
|
obj = self.__class__(**self.__dict__) |
|
obj.__dict__.update(attrs) |
|
return obj |
According to type hint None type should be returned but obj of type Prototype is returned.
python-patterns/patterns/creational/prototype.py
Lines 32 to 38 in 5f47b07
According to type hint None type should be returned but obj of type
Prototypeis returned.