As Mike Fletcher pointed out, a __deepcopy__() method should be called

with the memo as an argument.
This commit is contained in:
Guido van Rossum 1998-03-13 20:12:17 +00:00
parent 8046befce7
commit 677fc843ea
1 changed files with 1 additions and 1 deletions

View File

@ -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)