Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can also implement context managers / try-with-resources via generators. Not that I've seen it in the wild or recommend it. I remember it being annoying to debug for some reason.

https://stackoverflow.com/questions/62879698/any-tips-on-con...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: