summaryrefslogtreecommitdiff
path: root/Doc/library/pathlib.rst
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-07-14 07:44:59 +0300
committerBerker Peksag <berker.peksag@gmail.com>2016-07-14 07:44:59 +0300
commit2b8792137bf5e02ee4263822f818b31b68830f4b (patch)
treedc2a76d7c5c891545063427990e99e79e189c9c3 /Doc/library/pathlib.rst
parent3093bf163b6e5425196f79bf42532156da5c5ca3 (diff)
downloadcpython-git-2b8792137bf5e02ee4263822f818b31b68830f4b.tar.gz
Issue #27180: Clarify Path.rename() behavior on Unix systems
Patch by Evelyn Mitchell.
Diffstat (limited to 'Doc/library/pathlib.rst')
-rw-r--r--Doc/library/pathlib.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst
index f803fb6274..57a6a848f5 100644
--- a/Doc/library/pathlib.rst
+++ b/Doc/library/pathlib.rst
@@ -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')