
13 Nov
2019
13 Nov
'19
4:15 p.m.
On Wed, Nov 13, 2019 at 2:09 PM Sebastian Kreft skreft@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...