Added memo option to clone core method.

This commit is contained in:
Fabio Caccamo 2020-12-22 12:50:30 +01:00
parent cd18c854e8
commit 7fc6cf78ef
1 changed files with 2 additions and 2 deletions

View File

@ -3,8 +3,8 @@
import copy
def clone(obj, empty=False):
d = copy.deepcopy(obj)
def clone(obj, empty=False, memo=None):
d = copy.deepcopy(obj, memo)
if empty:
d.clear()
return d