From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 6 Aug 2018 19:59:43 +0000 (-0700) Subject: bpo-34319: Clarify file handler closure in pathlib.read_text (GH-8645) X-Git-Tag: v3.7.1rc1~195 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1c6df83e9318ab4ef8e32b805b8226b1324e1ffd;p=thirdparty%2FPython%2Fcpython.git bpo-34319: Clarify file handler closure in pathlib.read_text (GH-8645) Patch by Terry Jan Reedy. (cherry picked from commit 5b2657fb8c5aaa98e5748e1c325c74b97ea12fd1) Co-authored-by: Xtreak --- diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index 0929ee27c19e..ec604f681593 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -915,7 +915,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