[Python-ideas] Allow with (x as y, z as w):
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
Size: 819 bytes
Desc: OpenPGP digital signature
More information about the Python-ideas