Category
1Snippet
Clean code

Python Context Managers: Writing Clean Resource Handling with `with` Statements
Everyone learns with open(...) and stops. That is a shame, because the protocol behind it is two methods and it solves a whole category of bug: cleanup that does not happen on the paths you forgot a