13.11.17 02:00, Guido van Rossum пише:
It's hard to keep those two in sync, since the actual Grammar file is
constrained by being strictly LL(1)... Can you get someone else to
review the implementation?
I haven't change the grammar, just have changed checks in the CST to AST
transformer. Maybe it would be better to change the grammar, but I'm not
expert in this. Maybe Benjamin could provide better solution.
There are other related differences between language specification and
the implementation. The following examples are valid syntax:
@deco(x for x in [1])
def f(): ...
class C(x for x in [1]): ...
The latter always raises a TypeError at runtime ("cannot create
'generator' instances"), but is compiled successfully.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com