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

> Maybe there should be a context manager?

Even despite the:

> Absolutely.

My absolute least favorite response to this is:

> It's not that hard to write your own though:



The alternative is trying to get one merged into the standard library. At least writing your own is better than not having one!


I often see this answer as a reason it's not particularly important to have on in a standard library.

I strongly disagree with that sentiment as often these simple things have subtle gotchas, and/or subtle differences in possible net effects creating much bigger problems than their diminutive implementations would suggest.


I generally feel the same way as you. My comment about getting it merged was not meant to imply that it shouldn't get merged, but that it might be difficult to. I find it very hard to predict which of these small QoL features will be accepted by the core devs and which features will be rejected for some reason or other.




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

Search: