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

Ron Adam ron3200 at gmail.com
Mon Feb 16 01:03:26 CET 2015



On 02/15/2015 06:47 PM, Ben Finney wrote:
> MRAB<python at mrabarnett.plus.com>  writes:
>
>> >For example, how do you distinguish between:
>> >
>> >     with (as a b):
> That's ‘with (a as b):’, I think you mean.
>
>> >and:
>> >
>> >     with (a) as b:
> Are we expecting those two to have different effects?

Or should it be...

     With a, c, e as b, d, f:


This would be more in line with "=" and "in".  And you might be able to use 
an iterable to give a, c, and e. It's values.

Cheers,
    Ron



More information about the Python-ideas mailing list