Skip to content

Commit ff7746f

Browse files
committed
rename --> replace
1 parent f488ff8 commit ff7746f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Doc/library/pathlib.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,7 @@ Copying, moving and deleting
15981598
return a new :class:`!Path` instance pointing to *target*.
15991599

16001600
If both paths are on the same filesystem, the move is performed with
1601-
:func:`os.rename`. Otherwise, this path is copied (preserving metadata and
1601+
:func:`os.replace`. Otherwise, this path is copied (preserving metadata and
16021602
symlinks) and then deleted.
16031603

16041604
.. versionadded:: 3.14

Lib/pathlib/_local.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ def move(self, target):
856856
"""
857857

858858
try:
859-
return self.rename(target)
859+
return self.replace(target)
860860
except TypeError:
861861
if not isinstance(target, PathBase):
862862
raise

0 commit comments

Comments
 (0)