mirror of
https://github.com/python/cpython.git
synced 2025-11-09 22:16:39 +00:00
bpo-36182: Update pathlib.Path.write_text() docs (GH-12161)
with the case of an existing file
This commit is contained in:
parent
3ba51d587f
commit
af636f4f91
1 changed files with 3 additions and 0 deletions
|
|
@ -1119,6 +1119,9 @@ call fails (for example because the path doesn't exist).
|
||||||
>>> p.read_text()
|
>>> p.read_text()
|
||||||
'Text file contents'
|
'Text file contents'
|
||||||
|
|
||||||
|
An existing file of the same name is overwritten. The optional parameters
|
||||||
|
have the same meaning as in :func:`open`.
|
||||||
|
|
||||||
.. versionadded:: 3.5
|
.. versionadded:: 3.5
|
||||||
|
|
||||||
Correspondence to tools in the :mod:`os` module
|
Correspondence to tools in the :mod:`os` module
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue