Browse Source

Withable

pull/27/head
Jure Šorn 6 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() return self.file.read()
def __exit__(self, *args): def __exit__(self, *args):
self.file.close() self.file.close()
print(f'FileReader closed {self.filename!r}')
``` ```
```python ```python
@ -777,7 +776,6 @@ class FileReader():
>>> with FileReader('test.txt') as text: >>> with FileReader('test.txt') as text:
... print(text) ... print(text)
Hello World! Hello World!
FileReader closed 'test.txt'
``` ```
### Copy ### Copy

|||||||
100:0
Loading…
Cancel
Save