mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Clarify file-closing example in tutorial (GH-11652)
This commit is contained in:
committed by
Cheryl Sabella
parent
36c41bc201
commit
71ce03df9c
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user