File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ Interface summary:
31
31
32
32
Raised for module specific errors.
33
33
34
+ .. _shallow_vs_deep_copy :
34
35
35
36
The difference between shallow and deep copying is only relevant for compound
36
37
objects (objects that contain other objects, like lists or class instances):
Original file line number Diff line number Diff line change @@ -394,7 +394,8 @@ indexed and sliced::
394
394
[9, 16, 25]
395
395
396
396
All slice operations return a new list containing the requested elements. This
397
- means that the following slice returns a new (shallow) copy of the list::
397
+ means that the following slice returns a
398
+ :ref: `shallow copy <shallow_vs_deep_copy >` of the list::
398
399
399
400
>>> squares[:]
400
401
[1, 4, 9, 16, 25]
You can’t perform that action at this time.
0 commit comments