diff options
author | Guido van Rossum <guido@python.org> | 2006-08-28 15:27:34 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2006-08-28 15:27:34 +0000 |
commit | 86e58e239e39845e706c4afa392423f0fedcdf39 (patch) | |
tree | 1d0f4d942e644ee5c903636d87176b98a7203371 /Grammar | |
parent | Vestige of code from removing backticks. (diff) | |
download | cpython-86e58e239e39845e706c4afa392423f0fedcdf39.tar.gz cpython-86e58e239e39845e706c4afa392423f0fedcdf39.tar.bz2 cpython-86e58e239e39845e706c4afa392423f0fedcdf39.zip |
SF patch 1547796 by Georg Brandl -- set literals.
Diffstat (limited to 'Grammar')
-rw-r--r-- | Grammar/Grammar | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar index 31551f646e6..2e964f22551 100644 --- a/Grammar/Grammar +++ b/Grammar/Grammar @@ -101,7 +101,7 @@ factor: ('+'|'-'|'~') factor | power power: atom trailer* ['**' factor] atom: ('(' [yield_expr|testlist_gexp] ')' | '[' [listmaker] ']' | - '{' [dictmaker] '}' | + '{' [dictsetmaker] '}' | NAME | NUMBER | STRING+) listmaker: test ( list_for | (',' test)* [','] ) testlist_gexp: test ( gen_for | (',' test)* [','] ) @@ -112,7 +112,7 @@ subscript: '.' '.' '.' | test | [test] ':' [test] [sliceop] sliceop: ':' [test] exprlist: expr (',' expr)* [','] testlist: test (',' test)* [','] -dictmaker: test ':' test (',' test ':' test)* [','] +dictsetmaker: (test ':' test (',' test ':' test)* [',']) | (test (',' test)* [',']) classdef: 'class' NAME ['(' [testlist] ')'] ':' suite |