From: Colin Watson Date: Wed, 17 Apr 2019 12:18:37 +0000 (+0100) Subject: Clarify file-closing example in tutorial (GH-11652) X-Git-Tag: v3.8.0a4~164 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=71ce03df9c643faa94fbdf73bbb4e99a9a62cbdc;p=thirdparty%2FPython%2Fcpython.git Clarify file-closing example in tutorial (GH-11652) --- 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