From 71ce03df9c643faa94fbdf73bbb4e99a9a62cbdc Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 17 Apr 2019 13:18:37 +0100 Subject: [PATCH] Clarify file-closing example in tutorial (GH-11652) --- Doc/tutorial/inputoutput.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst index 79427860f51..fc2bd5578c4 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