Added memo option to clone core method.
This commit is contained in:
parent
cd18c854e8
commit
7fc6cf78ef
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue