bpo-36182: Update pathlib.Path.write_text() docs (GH-12161) (GH-15977)

with the case of an existing file
(cherry picked from commit af636f4f91)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
This commit is contained in:
Miss Islington (bot) 2019-09-11 08:55:31 -07:00 committed by Julien Palard
parent 20f80bfc83
commit 893653357c
1 changed files with 3 additions and 0 deletions

View File

@ -1106,6 +1106,9 @@ call fails (for example because the path doesn't exist).
>>> p.read_text()
'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
Correspondence to tools in the :mod:`os` module