Skip to content

Commit

Permalink
bpo-36182: Update pathlib.Path.write_text() docs (pythonGH-12161)
Browse files Browse the repository at this point in the history
with the case of an existing file
  • Loading branch information
lysnikolaou authored and JulienPalard committed Sep 11, 2019
1 parent 3ba51d5 commit af636f4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Doc/library/pathlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,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 af636f4

Please sign in to comment.