Changes for stride in slices (x[a🅱️c]) and ellipses (x[a,...,z])

This commit is contained in:
Guido van Rossum 1996-07-30 16:43:44 +00:00
parent e15d0dea07
commit 14f44516a4
1 changed files with 4 additions and 2 deletions

View File

@ -74,8 +74,10 @@ factor: ('+'|'-'|'~') factor | power
power: atom trailer* ('**' factor)*
atom: '(' [testlist] ')' | '[' [testlist] ']' | '{' [dictmaker] '}' | '`' testlist '`' | NAME | NUMBER | STRING+
lambdef: 'lambda' [varargslist] ':' test
trailer: '(' [arglist] ')' | '[' subscript ']' | '.' NAME
subscript: test (',' test)* [','] | [test] ':' [test]
trailer: '(' [arglist] ')' | '[' subscriptlist ']' | '.' NAME
subscriptlist: subscript (',' subscript)* [',']
subscript: '.' '.' '.' | test | [test] ':' [test] [sliceop]
sliceop: ':' [test]
exprlist: expr (',' expr)* [',']
testlist: test (',' test)* [',']
dictmaker: test ':' test (',' test ':' test)* [',']