bpo-36182: Update pathlib.Path.write_text() docs (GH-12161) · python/cpython@af636f4 (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit af636f4

lysnikolaouJulienPalard

authored and

committed

with the case of an existing file

File tree

1 file changed

lines changed

1 file changed

lines changed

Lines changed: 3 additions & 0 deletions

Original file line number Diff line number Diff line change
@@ -1119,6 +1119,9 @@ call fails (for example because the path doesn't exist).
1119 1119 >>> p.read_text()
1120 1120 'Text file contents'
1121 1121
1122 + An existing file of the same name is overwritten. The optional parameters
1123 + have the same meaning as in :func:`open`.
1124 +
1122 1125 .. versionadded:: 3.5
1123 1126
1124 1127 Correspondence to tools in the :mod:`os` module