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

This commit is contained in:
Colin Watson 2019-04-17 13:18:37 +01:00 committed by Cheryl Sabella
parent 36c41bc201
commit 71ce03df9c
1 changed files with 2 additions and 0 deletions

View 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