mirror of https://github.com/python/cpython.git
Memoize _deepcopy_tuple() -- maybe this helps Tommy's problem.
This commit is contained in:
parent
7c46a920ae
commit
6afff6139a
|
@ -182,8 +182,12 @@ def _deepcopy_tuple(x, memo):
|
|||
pass
|
||||
for i in range(len(x)):
|
||||
if x[i] is not y[i]:
|
||||
return tuple(y)
|
||||
return x
|
||||
y = tuple(y)
|
||||
break
|
||||
else:
|
||||
y = x
|
||||
memo[d] = y
|
||||
return y
|
||||
d[types.TupleType] = _deepcopy_tuple
|
||||
|
||||
def _deepcopy_dict(x, memo):
|
||||
|
|
Loading…
Reference in New Issue