dcp#

dcp(obj, die=True, memo=None)[source]#

Shortcut to perform a deep copy operation

Almost identical to copy.deepcopy(), but optionally fall back to copy.copy() if deepcopy fails.

Parameters:

die (bool) – if False, fall back to copy.copy()

New in version 2.0.0: default die=True instead of False
New in version 3.1.4: die=False passed to sc.cp(); “verbose” argument removed; warning raised
New in version 3.2.0: “memo” argument