[Python-ideas] Allow parentheses to be used with "with" block

Ethan Furman ethan at stoneleaf.us
Mon Feb 16 23:32:06 CET 2015


On 02/16/2015 02:18 PM, Neil Girdhar wrote:
>
> I think the most consistent way to do this if we would do it is to support parentheses
> around the "with statement".  We now know that though it's not "trivial", it's not too
> hard to implement it in the way that Andrew suggests.  I'd consider doing it if there
> were an approved PEP and a guaranteed fast review.

There are no guarantees.  There is also currently no PEP (that I'm aware of).

If you're willing to put the work in, start with a PEP -- but it's unlikely to be accepted without at least a working
proof-of-concept implementation.  It may still get rejected in the end, but we would then have a very good record of why
-- which can also be extremely useful.

--
~Ethan~

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150216/5293f921/attachment.sig>


More information about the Python-ideas mailing list