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

Paul Moore p.f.moore at gmail.com
Mon Feb 16 10:52:21 CET 2015


On 16 February 2015 at 05:40, Neil Girdhar <mistersheik at gmail.com> wrote:
> Personally, I would rather wait for a day far away when Python removes the
> LL(1) grammar restriction than introduce weird new syntax.  Maybe when the
> reference standard Python is written in Python and Python has a good parser
> module.  With backtracking, it should be fine and unambiguous.

Note that the fact that the parser is LL(1) is a design feature rather
than a limitation. Guido has certainly in the past indicated that it's
a deliberate choice. The idea is that LL(1) grammars are not only
easier for compilers to parse but also for users to understand.

So the day you're waiting for is indeed likely to be far away :-)
Paul


More information about the Python-ideas mailing list