Browse Source

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

pull/12858/head
Colin Watson 7 years ago
committed by Cheryl Sabella
parent
commit
71ce03df9c
  1. 2
      Doc/tutorial/inputoutput.rst

2
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

Loading…
Cancel
Save