Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
69ee87e9
Commit
69ee87e9
authored
Aug 24, 2019
by
Raymond Hettinger
Committed by
GitHub
Aug 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-14112: Allow beginners to explore shallowness in greater depth ;-) (GH-15465)
parent
fa7a6f5e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
Doc/library/copy.rst
Doc/library/copy.rst
+1
-0
Doc/tutorial/introduction.rst
Doc/tutorial/introduction.rst
+2
-1
No files found.
Doc/library/copy.rst
View file @
69ee87e9
...
...
@@ -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):
...
...
Doc/tutorial/introduction.rst
View file @
69ee87e9
...
...
@@ -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]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment