gh-109868: Skip deepcopy memo check for empty memo (GH-109869)
This commit is contained in:
10
Lib/copy.py
10
Lib/copy.py
@@ -121,13 +121,13 @@ def deepcopy(x, memo=None, _nil=[]):
|
||||
See the module's __doc__ string for more info.
|
||||
"""
|
||||
|
||||
d = id(x)
|
||||
if memo is None:
|
||||
memo = {}
|
||||
|
||||
d = id(x)
|
||||
y = memo.get(d, _nil)
|
||||
if y is not _nil:
|
||||
return y
|
||||
else:
|
||||
y = memo.get(d, _nil)
|
||||
if y is not _nil:
|
||||
return y
|
||||
|
||||
cls = type(x)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user