Browse Source

Withable

pull/27/head
Jure Šorn 5 years ago
parent
commit
1cc56f41e8
1 changed files with 0 additions and 2 deletions
  1. 2
      README.md

2
README.md

@ -768,7 +768,6 @@ class FileReader():
return self.file.read()
def __exit__(self, *args):
self.file.close()
print(f'FileReader closed {self.filename!r}')
```
```python
@ -777,7 +776,6 @@ class FileReader():
>>> with FileReader('test.txt') as text:
... print(text)
Hello World!
FileReader closed 'test.txt'
```
### Copy

Loading…
Cancel
Save