]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-29506: Clarify deep copy note in copy module
authorNick Coghlan <ncoghlan@gmail.com>
Sun, 9 Apr 2017 10:57:29 +0000 (20:57 +1000)
committerGitHub <noreply@github.com>
Sun, 9 Apr 2017 10:57:29 +0000 (20:57 +1000)
The reference to administrative data was confusing to readers,
so this simplifies the note to explain that deep copying may copy
more then you intended, such as data that you expected to be
shared between copies.

Patch by Sanyam Khurana.

Doc/library/copy.rst
Misc/ACKS

index a5378e54ec40161d132c5118736310632b2713e8..67cf65a8b250c7f300e20ce808ea25046b78cef2 100644 (file)
@@ -43,8 +43,8 @@ copy operations:
 * Recursive objects (compound objects that, directly or indirectly, contain a
   reference to themselves) may cause a recursive loop.
 
-* Because deep copy copies *everything* it may copy too much, e.g.,
-  even administrative data structures that should be shared even between copies.
+* Because deep copy copies everything it may copy too much, such as data
+  which is intended to be shared between copies.
 
 The :func:`deepcopy` function avoids these problems by:
 
index cacf7e558ee9a1a61698dc313db6f66e17ac5c2d..899a1905b4dbefc5fdcc8b05f358277de689022f 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -712,6 +712,7 @@ Magnus Kessler
 Lawrence Kesteloot
 Vivek Khera
 Dhiru Kholia
+Sanyam Khurana
 Mads Kiilerich
 Jason Killen
 Jan Kim