Added memo option to clone core method.
This commit is contained in:
parent
cd18c854e8
commit
7fc6cf78ef
|
@ -3,8 +3,8 @@
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
|
|
||||||
def clone(obj, empty=False):
|
def clone(obj, empty=False, memo=None):
|
||||||
d = copy.deepcopy(obj)
|
d = copy.deepcopy(obj, memo)
|
||||||
if empty:
|
if empty:
|
||||||
d.clear()
|
d.clear()
|
||||||
return d
|
return d
|
||||||
|
|
Loading…
Reference in New Issue