]> granicus.if.org Git - python/commitdiff
bpo-36182: Update pathlib.Path.write_text() docs (GH-12161)
authorLysandros Nikolaou <lisandrosnik@gmail.com>
Wed, 11 Sep 2019 15:08:10 +0000 (18:08 +0300)
committerJulien Palard <julien@palard.fr>
Wed, 11 Sep 2019 15:08:10 +0000 (17:08 +0200)
with the case of an existing file

Doc/library/pathlib.rst

index d33e2d0c89b1f45c436c452a9a3bb52421def2bb..acbd0e48af24255fe53fc0506ef2faf84754e100 100644 (file)
@@ -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