summaryrefslogtreecommitdiffstats
path: root/Lib/copy.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-06-13 19:28:47 (GMT)
committerGuido van Rossum <guido@python.org>2003-06-13 19:28:47 (GMT)
commit99d2c251df4782c52c3e1cb89064374af39ecb46 (patch)
treed50963ae51d6285c621c5840a23024bbeaf68588 /Lib/copy.py
parent097da0dc012d8c8164a043eee8f4b9622bc7b843 (diff)
downloadcpython-99d2c251df4782c52c3e1cb89064374af39ecb46.zip
cpython-99d2c251df4782c52c3e1cb89064374af39ecb46.tar.gz
cpython-99d2c251df4782c52c3e1cb89064374af39ecb46.tar.bz2
SF patch 707900, fixing bug 702858, by Steven Taschuk.
Copying a new-style class that had a reference to itself didn't work. (The same thing worked fine for old-style classes.)
Diffstat (limited to 'Lib/copy.py')
-rw-r--r--Lib/copy.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/copy.py b/Lib/copy.py
index a4a3ceb..02aa46b 100644
--- a/Lib/copy.py
+++ b/Lib/copy.py
@@ -334,6 +334,7 @@ def _reconstruct(x, info, deep, memo=None):
if deep:
args = deepcopy(args, memo)
y = callable(*args)
+ memo[id(x)] = y
if listiter is not None:
for item in listiter:
if deep: