[Python-checkins] r73318 - python/trunk/Grammar/Grammar
benjamin.peterson
python-checkins at python.org
Tue Jun 9 19:29:51 CEST 2009
Author: benjamin.peterson
Date: Tue Jun 9 19:29:51 2009
New Revision: 73318
Log:
explain why keyword names are not just NAME
Modified:
python/trunk/Grammar/Grammar
Modified: python/trunk/Grammar/Grammar
==============================================================================
--- python/trunk/Grammar/Grammar (original)
+++ python/trunk/Grammar/Grammar Tue Jun 9 19:29:51 2009
@@ -133,7 +133,9 @@
arglist: (argument ',')* (argument [',']
|'*' test (',' argument)* [',' '**' test]
|'**' test)
-argument: test [gen_for] | test '=' test # Really [keyword '='] test
+# The reason that keywords are test nodes instead of NAME is that using NAME
+# results in an amiguity. ast.c makes sure it's a NAME.
+argument: test [gen_for] | test '=' test
list_iter: list_for | list_if
list_for: 'for' exprlist 'in' testlist_safe [list_iter]
More information about the Python-checkins
mailing list