[Python-ideas] Allow with (x as y, z as w):

Barry Warsaw barry at python.org
Tue Apr 26 11:22:16 EDT 2016

On Apr 25, 2016, at 12:36 PM, Cory Benfield wrote:

>This request has come up a couple of times before.
>The upshot is: the restriction on context managers with parentheses like this
>is relatively likely to stick around.

I highly recommend looking at contextlib.ExitStack.  Once I started using
this idiom, I found I wanted the requested with-feature much less frequently.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160426/0759ab09/attachment.sig>

More information about the Python-ideas mailing list