]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-34319: Clarify file handler closure in pathlib.read_text (GH-8645)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 6 Aug 2018 20:04:30 +0000 (13:04 -0700)
committerGitHub <noreply@github.com>
Mon, 6 Aug 2018 20:04:30 +0000 (13:04 -0700)
Patch by Terry Jan Reedy.
(cherry picked from commit 5b2657fb8c5aaa98e5748e1c325c74b97ea12fd1)

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
Doc/library/pathlib.rst

index 7b3c9ecc2f092da488670f4a29a34025ed11461f..0377027da56fac62535ccd3c07b5109c970feece 100644 (file)
@@ -897,7 +897,8 @@ call fails (for example because the path doesn't exist):
       >>> p.read_text()
       'Text file contents'
 
-   The optional parameters have the same meaning as in :func:`open`.
+   The file is opened and then closed. The optional parameters have the same
+   meaning as in :func:`open`.
 
    .. versionadded:: 3.5