Dear all,

I'm wondering why in Python's grammar, keyword arguments are specified
as:

    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
http://docs.python.org/reference/expressions.html#grammar-token-keyword_item)
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!
Franck
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to