Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cpython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sip
Cpython
Commits
f51ed04c
Unverified
Commit
f51ed04c
authored
May 20, 2022
by
Stanley
Committed by
GitHub
May 20, 2022
Browse files
Options
Downloads
Patches
Plain Diff
gh-72073: Add Windows case in pathlib.rename (GH-93002)
#72073
https://docs.python.org/3.12/library/pathlib.html#pathlib.Path.rename
parent
31fa41ed
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Doc/library/pathlib.rst
+3
-2
3 additions, 2 deletions
Doc/library/pathlib.rst
with
3 additions
and
2 deletions
Doc/library/pathlib.rst
+
3
−
2
View file @
f51ed04c
...
...
@@ -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')
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment