[Python-Dev] Python Grammar Ambiguity

skip at pobox.com skip at pobox.com
Mon Apr 24 19:16:00 CEST 2006


    Michael> I've hit on what looks like a fundamental ambiguity in the
    Michael> Python grammar which is difficult to get round with PLY; and
    Michael> I'm wondering *why* the grammar is defined in this way.

Michael,

You refer to the ref manual documentation:

    Michael> List displays (list comprehensions) are defined as (from
    Michael> http://docs.python.org/ref/lists.html )

Note that the BNF there is mostly designed for human consumption.  Have you
verified that the ambiguity is also present in the Grammar file?

Skip


More information about the Python-Dev mailing list