]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #9021 - Introduce copy module better. Doc changes suggested by Terry
authorSenthil Kumaran <senthil@uthcode.com>
Thu, 9 Feb 2012 10:26:59 +0000 (18:26 +0800)
committerSenthil Kumaran <senthil@uthcode.com>
Thu, 9 Feb 2012 10:26:59 +0000 (18:26 +0800)
Reedy.

Doc/library/copy.rst
Misc/NEWS

index 5ae79aa91d1c7bd99bcc7243cc553922faa60037..0c68bd9d0cfd0e2d87888cb57ad4c6343e7303c6 100644 (file)
@@ -4,7 +4,11 @@
 .. module:: copy
    :synopsis: Shallow and deep copy operations.
 
-This module provides generic (shallow and deep) copying operations.
+Assignment statements in Python do not copy objects, they create bindings
+between a target and an object. For collections that are mutable or contain
+mutable items, a copy is sometimes needed so one can change one copy without
+changing the other. This module provides generic shallow and deep copy
+operations (explained below).
 
 
 Interface summary:
index 242c08ca2c69fd8547c1ca416f75fe05978c0dca..487b46fac02d3e54942bc01bdcc7c2ac2d17f46d 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -113,6 +113,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #9021: Add an introduction to the copy module documentation.
+
 - Issue #6005: Examples in the socket library documentation use sendall, where
   relevant, instead send method.