[Python-checkins] Clarify file-closing example in tutorial (GH-11652)

Cheryl Sabella webhook-mailer at python.org
Wed Apr 17 08:18:52 EDT 2019


https://github.com/python/cpython/commit/71ce03df9c643faa94fbdf73bbb4e99a9a62cbdc
commit: 71ce03df9c643faa94fbdf73bbb4e99a9a62cbdc
branch: master
author: Colin Watson <cjwatson at ubuntu.com>
committer: Cheryl Sabella <cheryl.sabella at gmail.com>
date: 2019-04-17T08:18:37-04:00
summary:

Clarify file-closing example in tutorial (GH-11652)

files:
M Doc/tutorial/inputoutput.rst

diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst
index 79427860f518..fc2bd5578c4c 100644
--- a/Doc/tutorial/inputoutput.rst
+++ b/Doc/tutorial/inputoutput.rst
@@ -322,6 +322,8 @@ equivalent :keyword:`try`\ -\ :keyword:`finally` blocks::
 
     >>> with open('workfile') as f:
     ...     read_data = f.read()
+
+    >>> # We can check that the file has been automatically closed.
     >>> f.closed
     True
 



More information about the Python-checkins mailing list