Bringing Go's defer statement to Python(musings.yasyf.com) |
Bringing Go's defer statement to Python(musings.yasyf.com) |
But you can merge multiple context manage-able resources into a single with expression. So the indentation issue isn't that big of an issue, usually. And now the context manage-y bits are separated from my main function.