Kaydet (Commit) 65492462 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

explain why keyword names are not just NAME

üst 80ce61c0
......@@ -133,7 +133,9 @@ classdef: 'class' NAME ['(' [testlist] ')'] ':' suite
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]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment