I'm wondering why in Python's grammar, keyword arguments are specified
argument: ... | test '=' test
I would have expected something like
argument: ... | NAME '=' test
Indeed, I cannot imagine a case where the keyword is something else
than an identifier. Moreover, in the Python language reference (see
one can read:
keyword_item ::= identifier "=" expression
which is what I was expecting.
Does any one knows why the grammar is so coded? Any intuition?
Thanks in advance!