[Python-ideas] unpacking context managers in WITH statement

Nick Coghlan ncoghlan at gmail.com
Mon Feb 6 21:54:38 CET 2012


On Tue, Feb 7, 2012 at 6:08 AM, Yury Selivanov <yselivanov.ml at gmail.com> wrote:
> Well, native syntax would be much useful, but ContextStack seems like
> a decent workaround.  Will it be included in the stdlib (py3.3)?

Most likely (I'm the primary maintainer of contextlib, so it's
basically my call).

Feedback on what it's like to use in practice would definitely help
with that - I put it up on PyPI as contextlib2 so people could try it
out and help me avoid repeating the mistakes we made with nested()
(which was an error prone bug trap).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-ideas mailing list