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

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Feb 16 06:32:34 CET 2015


I *think* this is unambiguous:

    with a as b and c as d and e as f:
       ...

because the rule for a with statement is

with_stmt: 'with' with_item (',' with_item)*  ':' suite
with_item: test ['as' expr]

and expr doesn't include 'and'.

-- 
Greg


More information about the Python-ideas mailing list