4 ms·
True. Here's his examples rewritten in Python (Python is not Ruby despite that both are nice languages): with atomicio_handler(afile) as handle: handl
by d0mine 18y ago
True.
Here's his examples rewritten in Python (Python is not Ruby despite that both are nice languages):
with atomicio_handler(afile) as handle:
handle.write("foo")
if blah:
raise Exception, "baz"
handle.write("bar")
with atomicio_handler(afile) as fh1:
with atomicio_handler(anotherfile) as fh2:
...