Skip to content

Commit af636f4

Browse files
lysnikolaouJulienPalard
authored andcommitted
bpo-36182: Update pathlib.Path.write_text() docs (GH-12161)
with the case of an existing file
1 parent 3ba51d5 commit af636f4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Doc/library/pathlib.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,9 @@ call fails (for example because the path doesn't exist).
11191119
>>> p.read_text()
11201120
'Text file contents'
11211121

1122+
An existing file of the same name is overwritten. The optional parameters
1123+
have the same meaning as in :func:`open`.
1124+
11221125
.. versionadded:: 3.5
11231126

11241127
Correspondence to tools in the :mod:`os` module

0 commit comments

Comments
 (0)