summaryrefslogtreecommitdiffstats
path: root/Doc/library/copy.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/copy.rst')
-rw-r--r--Doc/library/copy.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/library/copy.rst b/Doc/library/copy.rst
index 6fb3100..50baabf 100644
--- a/Doc/library/copy.rst
+++ b/Doc/library/copy.rst
@@ -54,6 +54,10 @@ file, socket, window, array, or any similar types. It does "copy" functions and
classes (shallow and deeply), by returning the original object unchanged; this
is compatible with the way these are treated by the :mod:`pickle` module.
+Shallow copies of dictionaries can be made using :meth:`dict.copy`, and
+of lists by assigning a slice of the entire list, for example,
+``copied_list = original_list[:]``.
+
.. versionchanged:: 2.5
Added copying functions.