[docs] Typo or poor example on page docs.python.org/2/library/copy.html

Georg Brandl georg at python.org
Sat Mar 15 10:12:26 CET 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 07.03.2014 17:59, schrieb Daniel Thomson:
> On http://docs.python.org/2/library/copy.html I found the following
> passage:
> 
> 
> """
> 
> Two problems often exist with deep copy operations that don?t exist with
> shallow 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.,
> administrative data structures that should be shared even between copies.
> 
> """
> 
> 
> I believe that last sentience should read, "... administrative data
> structures that should not be shared even between copies."
> 
> 
> If the administrative data structures should be shared even between copies,
> then it is a very poor example of a problem caused by deepcopy(). It would
> instead be a very good reason to use deepcopy().

Hi Daniel,

thanks for your email.  I don't see your problem though; if the administrative
structures should be shared, deepcopy() would violate that requirement.

cheers,
Georg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iEYEARECAAYFAlMkGXoACgkQN9GcIYhpnLADOACggoEHOmWlwgK0ulEdvtjwjlhA
C9wAn28tNM+GfBFpGUXAVZyuiMjcqp3M
=uHJe
-----END PGP SIGNATURE-----


More information about the docs mailing list