On Wed, Nov 13, 2019 at 2:09 PM Sebastian Kreft <skr...@gmail.com> wrote:

> What Eric Fahlgren wants is basically the deprecated contextlib.nested
> function, that function should have the right semantics. See
> https://github.com/python/cpython/blob/2.7/Lib/contextlib.py#L88-L129
>

Oh, no, I don't want it. :)  I just was killing time reading py-ideas while
eating lunch and was somewhat surprised by the ability to return a tuple as
the context manager result and have it unpack appropriately, nothing more.
I absolutely would never use my example code a production environment, and
if not there, then why even bother using it in a hacked up one-time script,
where I'd just leave the files open and assume they'll be closed on exit...
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/FGEYMZZ7JG4GJOLKO4QAC3F7FYXUAKE5/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to