[Python-checkins] cpython (3.4): clarify behavior of shutil.move when destination exists (closes #22933)
benjamin.peterson
python-checkins at python.org
Sun Mar 22 15:15:16 CET 2015
https://hg.python.org/cpython/rev/e5de4ee6aa4a
changeset: 95123:e5de4ee6aa4a
branch: 3.4
parent: 95121:9eb1ce7d8039
user: Benjamin Peterson <benjamin at python.org>
date: Sun Mar 22 10:11:54 2015 -0400
summary:
clarify behavior of shutil.move when destination exists (closes #22933)
Patch by Mike Short.
files:
Doc/library/shutil.rst | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst
--- a/Doc/library/shutil.rst
+++ b/Doc/library/shutil.rst
@@ -287,12 +287,9 @@
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
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list