[Python-checkins] r74738 - in python/branches/py3k: Doc/library/copy.rst

georg.brandl python-checkins at python.org
Wed Sep 9 18:51:05 CEST 2009


Author: georg.brandl
Date: Wed Sep  9 18:51:05 2009
New Revision: 74738

Log:
Merged revisions 74737 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74737 | georg.brandl | 2009-09-09 18:49:13 +0200 (Mi, 09 Sep 2009) | 1 line
  
  Properly document copy and deepcopy as functions.
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Doc/library/copy.rst

Modified: python/branches/py3k/Doc/library/copy.rst
==============================================================================
--- python/branches/py3k/Doc/library/copy.rst	(original)
+++ python/branches/py3k/Doc/library/copy.rst	Wed Sep  9 18:51:05 2009
@@ -4,21 +4,25 @@
 .. module:: copy
    :synopsis: Shallow and deep copy operations.
 
+This module provides generic (shallow and deep) copying operations.
 
-.. index::
-   single: copy() (in copy)
-   single: deepcopy() (in copy)
 
-This module provides generic (shallow and deep) copying operations.
+Interface summary:
+
+.. function:: copy(x)
+
+   Return a shallow copy of *x*.
+
+
+.. function:: deepcopy(x)
+
+   Return a deep copy of *x*.
 
-Interface summary::
 
-   import copy
+.. exception:: error
 
-   x = copy.copy(y)        # make a shallow copy of y
-   x = copy.deepcopy(y)    # make a deep copy of y
+   Raised for module specific errors.
 
-For module specific errors, :exc:`copy.error` is raised.
 
 The difference between shallow and deep copying is only relevant for compound
 objects (objects that contain other objects, like lists or class instances):


More information about the Python-checkins mailing list