]> granicus.if.org Git - python/commitdiff
clarify behavior of shutil.move when destination exists (closes #22933)
authorBenjamin Peterson <benjamin@python.org>
Sun, 22 Mar 2015 14:11:54 +0000 (10:11 -0400)
committerBenjamin Peterson <benjamin@python.org>
Sun, 22 Mar 2015 14:11:54 +0000 (10:11 -0400)
Patch by Mike Short.

Doc/library/shutil.rst

index d96fd719340a1aa07d0951daba65f21fdee69fae..cd86e92944e17bc655c32a248a4f45d028e41e2c 100644 (file)
@@ -287,12 +287,9 @@ Directory and files operations
    Recursively move a file or directory (*src*) to another location (*dst*)
    and return the destination.
 
-   If the destination is a directory or a symlink to a directory, then *src* is
-   moved inside that directory.
-
-   The destination directory must not already exist.  If the destination already
-   exists but is not a directory, it may be overwritten depending on
-   :func:`os.rename` semantics.
+   If the destination is an existing directory, then *src* is moved inside that
+   directory. If the destination already exists but is not a directory, it may
+   be overwritten depending on :func:`os.rename` semantics.
 
    If the destination is on the current filesystem, then :func:`os.rename` is
    used.  Otherwise, *src* is copied (using :func:`shutil.copy2`) to *dst* and