[Python-checkins] bpo-34319: Clarify file handler closure in pathlib.read_text (GH-8645)

Terry Jan Reedy webhook-mailer at python.org
Mon Aug 6 15:55:07 EDT 2018


https://github.com/python/cpython/commit/5b2657fb8c5aaa98e5748e1c325c74b97ea12fd1
commit: 5b2657fb8c5aaa98e5748e1c325c74b97ea12fd1
branch: master
author: Xtreak <tirkarthi at users.noreply.github.com>
committer: Terry Jan Reedy <tjreedy at udel.edu>
date: 2018-08-06T15:55:03-04:00
summary:

bpo-34319: Clarify file handler closure in pathlib.read_text (GH-8645)

Patch by Terry Jan Reedy.

files:
M Doc/library/pathlib.rst

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
 



More information about the Python-checkins mailing list