Commit 69ee87e9 authored by Raymond Hettinger's avatar Raymond Hettinger Committed by GitHub

bpo-14112: Allow beginners to explore shallowness in greater depth ;-) (GH-15465)

parent fa7a6f5e
......@@ -31,6 +31,7 @@ Interface summary:
Raised for module specific errors.
.. _shallow_vs_deep_copy:
The difference between shallow and deep copying is only relevant for compound
objects (objects that contain other objects, like lists or class instances):
......
......@@ -394,7 +394,8 @@ indexed and sliced::
[9, 16, 25]
All slice operations return a new list containing the requested elements. This
means that the following slice returns a new (shallow) copy of the list::
means that the following slice returns a
:ref:`shallow copy <shallow_vs_deep_copy>` of the list::
>>> squares[:]
[1, 4, 9, 16, 25]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment