[docs] [issue9021] no copy.copy problem description

Terry J. Reedy report at bugs.python.org
Mon Jun 21 21:21:49 CEST 2010


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Shorter and better version.

Assignment statements create bindings between a target and an object. They never duplicate or copy an existing 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). Shallow copies can also be obtained by whole sequence slicing (s[:]) and some class constructors (tuple, list, set, dict).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9021>
_______________________________________


More information about the docs mailing list