2 ms·
Python doesn't have defer/panic, but it does have "with" statements which solve this issue in a RAII-like style: with open('foo') as f: # do stuff
by vog 14y ago
Python doesn't have defer/panic, but it does have "with" statements which solve this issue in a RAII-like style:
with open('foo') as f:
# do stuff