]> granicus.if.org Git - python/commitdiff
Clarify file-closing example in tutorial (GH-11652)
authorColin Watson <cjwatson@ubuntu.com>
Wed, 17 Apr 2019 12:18:37 +0000 (13:18 +0100)
committerCheryl Sabella <cheryl.sabella@gmail.com>
Wed, 17 Apr 2019 12:18:37 +0000 (08:18 -0400)
Doc/tutorial/inputoutput.rst

index 79427860f518ff842fa4e262f0cc63ba8e8c6be4..fc2bd5578c4cf15581fd409b5e7ac954b6cf153f 100644 (file)
@@ -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