diff -r 52ab9e1ff46a Lib/copy.py --- a/Lib/copy.py Sun Feb 16 14:17:28 2014 -0500 +++ b/Lib/copy.py Sun Feb 16 23:39:45 2014 +0200 @@ -221,17 +221,15 @@ d[list] = _deepcopy_list def _deepcopy_tuple(x, memo): - y = [] - for a in x: - y.append(deepcopy(a, memo)) + y = [deepcopy(a, memo) for a in x] # We're not going to put the tuple in the memo, but it's still important we # check for it, in case the tuple contains recursive mutable structures. try: return memo[id(x)] except KeyError: pass - for i in range(len(x)): - if x[i] is not y[i]: + for k, j in zip(x, y): + if k is not j: y = tuple(y) break else: