]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #27180: Clarify Path.rename() behavior on Unix systems
authorBerker Peksag <berker.peksag@gmail.com>
Thu, 14 Jul 2016 04:44:59 +0000 (07:44 +0300)
committerBerker Peksag <berker.peksag@gmail.com>
Thu, 14 Jul 2016 04:44:59 +0000 (07:44 +0300)
Patch by Evelyn Mitchell.

Doc/library/pathlib.rst

index f803fb6274648bd82270491e14834277e1b426ac..57a6a848f541cfd47dfe38461d069fb9c968837c 100644 (file)
@@ -891,8 +891,9 @@ call fails (for example because the path doesn't exist):
 
 .. method:: Path.rename(target)
 
-   Rename this file or directory to the given *target*.  *target* can be
-   either a string or another path object::
+   Rename this file or directory to the given *target*.  On Unix, if
+   *target* exists and is a file, it will be replaced silently if the user
+   has permission.  *target* can be either a string or another path object::
 
       >>> p = Path('foo')
       >>> p.open('w').write('some text')