Skip to content

Commit

Permalink
bpo-36182: Update pathlib.Path.write_text() docs (GH-12161) (GH-15977)
Browse files Browse the repository at this point in the history
with the case of an existing file
(cherry picked from commit af636f4)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
  • Loading branch information
2 people authored and JulienPalard committed Sep 11, 2019
1 parent 20f80bf commit 8936533
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Doc/library/pathlib.rst
Expand Up @@ -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
Expand Down

0 comments on commit 8936533

Please sign in to comment.