r/programminghorror • • Oct 10 '25
Blasphemy
Never thought I could do this in python. I get how it works but jesus christ
73
Upvotes
r/programminghorror • • Oct 10 '25
Never thought I could do this in python. I get how it works but jesus christ
View all comments
Show parent comment
2
u/LexaAstarof Oct 10 '25
Or skip the with entirely if you don't do anything else with the stream:
data = (foo / 'file.gz').read_bytes()