Re:ISO name change for Türkiye
by nerdponx on Tuesday July 12, 2022 @11:36AM
(#32071471)
Absolutely. It's not that hard to write your own though:
Contextlib is one of the under-appreciated gems in Python: https://docs.python.org/3/library/contextlib.html#contextlib...
[ Parent
| on HN ]
> 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.