8000 bpo-14112: Allow beginners to explore shallowness in greater depth ;-… · python/cpython@69ee87e · GitHub
[go: up one dir, main page]

Skip to content

Commit 69ee87e

Browse files
authored
bpo-14112: Allow beginners to explore shallowness in greater depth ;-) (GH-15465)
1 parent fa7a6f5 commit 69ee87e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Doc/library/copy.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Interface summary:
3131

3232
Raised for module specific errors.
3333

34+
.. _shallow_vs_deep_copy:
3435

3536
The difference between shallow and deep copying is only relevant for compound
3637
objects (objects that contain other objects, like lists or class instances):

Doc/tutorial/introduction.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,8 @@ indexed and sliced::
394394
[9, 16, 25]
395395

396396
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::
398399

399400
>>> squares[:]
400401
[1, 4, 9, 16, 25]

0 commit comments

Comments
 (0)
0