mirror of https://github.com/python/cpython.git
As Mike Fletcher pointed out, a __deepcopy__() method should be called
with the memo as an argument.
This commit is contained in:
parent
8046befce7
commit
677fc843ea
|
@ -215,7 +215,7 @@ def _keep_alive(x, memo):
|
|||
|
||||
def _deepcopy_inst(x, memo):
|
||||
if hasattr(x, '__deepcopy__'):
|
||||
return x.__deepcopy__()
|
||||
return x.__deepcopy__(memo)
|
||||
if hasattr(x, '__getinitargs__'):
|
||||
args = x.__getinitargs__()
|
||||
_keep_alive(args, memo)
|
||||
|
|
Loading…
Reference in New Issue