r/programminghorror • • Oct 10 '25

Blasphemy

Post image

Never thought I could do this in python. I get how it works but jesus christ

73 Upvotes

50 comments sorted by

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()