mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
gh-84459: Make wording more specific for Path.replace (GH-91853)
GH-84459
(cherry picked from commit 161dff7e10)
Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
This commit is contained in:
parent
777d478d12
commit
86e4bdaf49
2 changed files with 2 additions and 2 deletions
|
|
@ -2338,7 +2338,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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue