]> granicus.if.org Git - python/commitdiff
bpo-36182: Update pathlib.Path.write_text() docs (GH-12161) (GH-15977)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 11 Sep 2019 15:55:31 +0000 (08:55 -0700)
committerJulien Palard <julien@palard.fr>
Wed, 11 Sep 2019 15:55:31 +0000 (17:55 +0200)
with the case of an existing file
(cherry picked from commit af636f4f91b8289b6dad95cb84123f6e22fd7f4f)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Doc/library/pathlib.rst

index ad8f6011ad02f9139992bb175b705529577b0b2f..326bb2e933cdb2ddbea283a7ce3c5520e62a4e68 100644 (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