[Python-Dev] PEP 492 vs. PEP 3152, new round

Greg greg.ewing at canterbury.ac.nz
Fri May 1 03:13:20 CEST 2015


On 1/05/2015 6:04 a.m., Yury Selivanov wrote:

> I still want to see where my current grammar forces to use
> parens.  See [1], there are no useless parens anywhere.

It's not about requiring or not requiring parens. It's about
making the simplest possible change to the grammar necessary
to achieve the desired goals. Keeping the grammar simple
makes it easy for humans to reason about.

The question is whether syntactically disallowing certain
constructs that are unlikely to be needed is a desirable
enough goal to be worth complicating the grammar. You think
it is, some others of us think it's not.

> FWIW, I'll fix the 'await (await x)' expression to be parsed
> without parens.

I don't particularly care whether 'await -x' or 'await await x'
can be written without parens or not. The point is that the
simplest grammar change necessary to be able to write the
things we *do* want also happens to allow those. I don't see
that as a problem worth worrying about.

-- 
Greg



More information about the Python-Dev mailing list