Hacker News new | ask | show | jobs
by jakewins 429 days ago
This is the exact opposite? They explicitly encourage doing resource-opening in the __enter__ method call, and then returning the opened resource encapsulated inside an object.

Nothing about the contract encourages doing anything fallible in __init__