summaryrefslogtreecommitdiffstats
path: root/Grammar
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-08-28 15:27:34 (GMT)
committerGuido van Rossum <guido@python.org>2006-08-28 15:27:34 (GMT)
commit86e58e239e39845e706c4afa392423f0fedcdf39 (patch)
tree1d0f4d942e644ee5c903636d87176b98a7203371 /Grammar
parentecfd0b2f3bfd622c3ba148e53d3feebb8c1ae721 (diff)
downloadcpython-86e58e239e39845e706c4afa392423f0fedcdf39.zip
cpython-86e58e239e39845e706c4afa392423f0fedcdf39.tar.gz
cpython-86e58e239e39845e706c4afa392423f0fedcdf39.tar.bz2
SF patch 1547796 by Georg Brandl -- set literals.
Diffstat (limited to 'Grammar')
-rw-r--r--Grammar/Grammar4
1 files changed, 2 insertions, 2 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar
index 31551f6..2e964f2 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