diff options
author | Colin Watson <cjwatson@ubuntu.com> | 2019-04-17 12:18:37 (GMT) |
---|---|---|
committer | Cheryl Sabella <cheryl.sabella@gmail.com> | 2019-04-17 12:18:37 (GMT) |
commit | 71ce03df9c643faa94fbdf73bbb4e99a9a62cbdc (patch) | |
tree | 75e213dd6bd9d03d682bdbd7ee692d60864deed3 | |
parent | 36c41bc2017921321dbb19557f616a6bb7572c83 (diff) | |
download | cpython-71ce03df9c643faa94fbdf73bbb4e99a9a62cbdc.zip cpython-71ce03df9c643faa94fbdf73bbb4e99a9a62cbdc.tar.gz cpython-71ce03df9c643faa94fbdf73bbb4e99a9a62cbdc.tar.bz2 |
Clarify file-closing example in tutorial (GH-11652)
-rw-r--r-- | Doc/tutorial/inputoutput.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst index 7942786..fc2bd55 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 |