Comment Comment by mattip That cleanup can be explicit when needed by using context managers. Mixing resource handling with object lifetime is a bad design choice parent mattip 7 months ago