Boosted by glyph ("Glyph"):
eliocamp ("Elio Campitelli") wrote:
TIL:
```
if not path.exists(path):
return Nonewith open(path) as f:
f.readline()
```can fail if the path is deleted between the first and the second block.
Boosted by glyph ("Glyph"):
eliocamp ("Elio Campitelli") wrote:
TIL:
```
if not path.exists(path):
return Nonewith open(path) as f:
f.readline()
```can fail if the path is deleted between the first and the second block.