diff options
Diffstat (limited to 'Lib/copy.py')
-rw-r--r-- | Lib/copy.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/copy.py b/Lib/copy.py index 6d7bb9a..a69bc4e 100644 --- a/Lib/copy.py +++ b/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) |