Greetings to Python users, I'm trying to parse Python code using the grammar supplied with the documentation set, and have a question on the grammar for function parameters:
funcdef: 'def' NAME parameters ['->' test] ':' suite parameters: '(' [typedargslist] ')' typedargslist: ((tfpdef ['=' test] ',')* ('*' [tfpdef] (',' tfpdef ['=' test])* [',' '**' tfpdef] | '**' tfpdef) | tfpdef ['=' test] (',' tfpdef ['=' test])* [',']) tfpdef: NAME [':' test] >From what I understand, a naked asterisk - i.e. it is not a prefix to an identifier - is not a valid parameter, but the grammar explicitly allows it by making the identifier that immediately follows the asterisk optional. Are there cases where naked asterisk is allowed as a function parameter? If not, would it be correct for the grammar to specify the identifier trailing asterisk as mandatory? Thanks for any insight. Jay -- http://mail.python.org/mailman/listinfo/python-list