diff options
author | slateny <46876382+slateny@users.noreply.github.com> | 2022-04-27 22:03:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-27 22:03:03 (GMT) |
commit | 161dff7e10eeb7eaf6d418b91e993aaf84770a5c (patch) | |
tree | 47f19f3e9dd097f676e787c33ab3e89a55170e97 | |
parent | c6b84a727c9299f24edbab4105ce47e9f2bae199 (diff) | |
download | cpython-161dff7e10eeb7eaf6d418b91e993aaf84770a5c.zip cpython-161dff7e10eeb7eaf6d418b91e993aaf84770a5c.tar.gz cpython-161dff7e10eeb7eaf6d418b91e993aaf84770a5c.tar.bz2 |
gh-84459: Make wording more specific for Path.replace (GH-91853)
#84459
-rw-r--r-- | Doc/library/os.rst | 2 | ||||
-rw-r--r-- | Doc/library/pathlib.rst | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 471890e..d42259b 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -2348,7 +2348,7 @@ features: .. function:: replace(src, dst, *, src_dir_fd=None, dst_dir_fd=None) - Rename the file or directory *src* to *dst*. If *dst* is a directory, + Rename the file or directory *src* to *dst*. If *dst* is a non-empty directory, :exc:`OSError` will be raised. If *dst* exists and is a file, it will be replaced silently if the user has permission. The operation may fail if *src* and *dst* are on different filesystems. If successful, diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index 1e7bc31..01e9cfb 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -1042,7 +1042,7 @@ call fails (for example because the path doesn't exist). Rename this file or directory to the given *target*, and return a new Path instance pointing to *target*. If *target* points to an existing file or - directory, it will be unconditionally replaced. + empty directory, it will be unconditionally replaced. The target path may be absolute or relative. Relative paths are interpreted relative to the current working directory, *not* the directory of the Path |