This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Ramchandra Apte, docs@python, eric.araujo, ezio.melotti, ned.deily, terry.reedy, tim.golden, tshepang
Date 2012-02-26.00:12:04
SpamBayes Score 2.5545974e-05
Marked as misclassified No
Message-id <1330215124.9.0.232389966166.issue14112@psf.upfronthosting.co.za>
In-reply-to
Content
'Shallow' is a common English word: "Stay in shallow water until you learn to swim!" But that is not the issue here.

I think the underlying issue is that the first sentence "All slice operations return a new list containing the requested elements." is wrong. Python lists, like shopping lists, do not 'contain' objects. Both contain references to objects (copies of their identifieres) and thereby define an abstract collection. A shallow copy of a collection object copies references (ids). A deep copy also copies objects themselves. (The Wikipedia article says much the same, but to me much less clearly.) 

If we start with a true sentence "Slice operations return a new list containing references to a subsequence of the original elements." or "Slice operations return a new list that defines a subsequence of the original sequence of objects", then I do not think more *needs* to be said. We could optionally add "Since no objects are copied, slices are shallow copies." both to emphasize that no objects are copied and to introduced the notion of shallow copy.
History
Date User Action Args
2012-02-26 00:12:04terry.reedysetrecipients: + terry.reedy, tim.golden, ned.deily, ezio.melotti, eric.araujo, docs@python, tshepang, Ramchandra Apte
2012-02-26 00:12:04terry.reedysetmessageid: <1330215124.9.0.232389966166.issue14112@psf.upfronthosting.co.za>
2012-02-26 00:12:04terry.reedylinkissue14112 messages
2012-02-26 00:12:04terry.reedycreate