[Python-checkins] bpo-36182: Update pathlib.Path.write_text() docs (GH-12161)

Julien Palard webhook-mailer at python.org
Wed Sep 11 11:08:14 EDT 2019


https://github.com/python/cpython/commit/af636f4f91b8289b6dad95cb84123f6e22fd7f4f
commit: af636f4f91b8289b6dad95cb84123f6e22fd7f4f
branch: master
author: Lysandros Nikolaou <lisandrosnik at gmail.com>
committer: Julien Palard <julien at palard.fr>
date: 2019-09-11T17:08:10+02:00
summary:

bpo-36182: Update pathlib.Path.write_text() docs (GH-12161)

with the case of an existing file

files:
M Doc/library/pathlib.rst

diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst
index d33e2d0c89b1..acbd0e48af24 100644
--- a/Doc/library/pathlib.rst
+++ b/Doc/library/pathlib.rst
@@ -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



More information about the Python-checkins mailing list