Skip to content

Commit 71ce03d

Browse files
cjwatsoncsabella
authored andcommitted
Clarify file-closing example in tutorial (pythonGH-11652)
1 parent 36c41bc commit 71ce03d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Doc/tutorial/inputoutput.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,8 @@ equivalent :keyword:`try`\ -\ :keyword:`finally` blocks::
322322

323323
>>> with open('workfile') as f:
324324
... read_data = f.read()
325+
326+
>>> # We can check that the file has been automatically closed.
325327
>>> f.closed
326328
True
327329

0 commit comments

Comments
 (0)