Skip to content
Snippets Groups Projects
Unverified Commit f51ed04c authored by Stanley's avatar Stanley Committed by GitHub
Browse files

gh-72073: Add Windows case in pathlib.rename (GH-93002)

parent 31fa41ed
Branches
Tags
No related merge requests found
......@@ -1021,8 +1021,9 @@ 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*. 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::
it will be replaced silently if the user has permission.
On Windows, if *target* exists, :data:`FileExistsError` will be raised.
*target* can be either a string or another path object::
>>> p = Path('foo')
>>> p.open('w').write('some text')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment