mirror of
https://github.com/python/cpython.git
synced 2025-09-03 15:31:08 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -215,7 +215,7 @@ def _keep_alive(x, memo):
|
||||||
|
|
||||||
def _deepcopy_inst(x, memo):
|
def _deepcopy_inst(x, memo):
|
||||||
if hasattr(x, '__deepcopy__'):
|
if hasattr(x, '__deepcopy__'):
|
||||||
return x.__deepcopy__()
|
return x.__deepcopy__(memo)
|
||||||
if hasattr(x, '__getinitargs__'):
|
if hasattr(x, '__getinitargs__'):
|
||||||
args = x.__getinitargs__()
|
args = x.__getinitargs__()
|
||||||
_keep_alive(args, memo)
|
_keep_alive(args, memo)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue