File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Grammar for Python, version 10
1+ # Grammar for Python
22
3- # Changes since version 9:
4- # Equality is now only tested with '=='
3+ # Change log:
4+
5+ # 11-Jan-92:
6+ # Variable length argument list syntax added: def f(a, b, +rest): ...
7+
8+ # 8-Jan-92:
9+ # Allow only '==' for equality testing
510
611# Changes since version 8:
712# Trailing commas in formal parameter lists are allowed
@@ -56,9 +61,10 @@ expr_input: testlist NEWLINE
5661eval_input: testlist ENDMARKER
5762
5863funcdef: 'def' NAME parameters ':' suite
59- parameters: '(' [fplist ] ')'
60- fplist: fpdef (',' fpdef)* [',']
64+ parameters: '(' [varargslist ] ')'
65+ varargslist: (fpdef ',')* '+' NAME | fpdef (',' fpdef)* [',']
6166fpdef: NAME | '(' fplist ')'
67+ fplist: fpdef (',' fpdef)* [',']
6268
6369stmt: simple_stmt | compound_stmt
6470simple_stmt: small_stmt (';' small_stmt)* [';'] NEWLINE
You can’t perform that action at this time.
0 commit comments