[Python-checkins] cpython (merge 3.2 -> default): merge from 3.2 - Fix closes issue12577 - clarify shutil.move documentation.

senthil.kumaran python-checkins at python.org
Tue Jul 19 02:06:05 CEST 2011


http://hg.python.org/cpython/rev/912b97ee40a7
changeset:   71415:912b97ee40a7
parent:      71413:aee7c27ea7df
parent:      71414:62048a6eb43c
user:        Senthil Kumaran <senthil at uthcode.com>
date:        Tue Jul 19 08:03:55 2011 +0800
summary:
  merge from 3.2 - Fix closes issue12577 - clarify shutil.move documentation. Patch suggestion by Catalin Iacob

files:
  Doc/library/shutil.rst |  6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)


diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst
--- a/Doc/library/shutil.rst
+++ b/Doc/library/shutil.rst
@@ -161,8 +161,10 @@
 
    Recursively move a file or directory to another location.
 
-   If the destination is on the current filesystem, then simply use rename.
-   Otherwise, copy src (with :func:`copy2`) to the dst and then remove src.
+   Uses :func:`os.rename` to perform the move. If it fails, for reasons such as
+   when *src* and *dst* are on different filesystems or in case of windows where
+   rename is not supported when *dst* exists, fallback to copying *src* (with
+   :func:`copy2`) to the *dst* and then remove *src*.
 
 .. function:: disk_usage(path)
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list