mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Issue #27180: Merge from 3.5
This commit is contained in:
commit
663dacda4d
1 changed files with 3 additions and 2 deletions
|
@ -900,8 +900,9 @@ call fails (for example because the path doesn't exist):
|
||||||
|
|
||||||
.. method:: Path.rename(target)
|
.. method:: Path.rename(target)
|
||||||
|
|
||||||
Rename this file or directory to the given *target*. *target* can be
|
Rename this file or directory to the given *target*. On Unix, if
|
||||||
either a string or another path object::
|
*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::
|
||||||
|
|
||||||
>>> p = Path('foo')
|
>>> p = Path('foo')
|
||||||
>>> p.open('w').write('some text')
|
>>> p.open('w').write('some text')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue