summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_grammar.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_grammar.py')
-rw-r--r--Lib/test/test_grammar.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py
index 331d527..93dc9ec 100644
--- a/Lib/test/test_grammar.py
+++ b/Lib/test/test_grammar.py
@@ -685,8 +685,8 @@ print L
print 'atoms'
-### atom: '(' [testlist] ')' | '[' [testlist] ']' | '{' [dictmaker] '}' | NAME | NUMBER | STRING
-### dictmaker: test ':' test (',' test ':' test)* [',']
+### atom: '(' [testlist] ')' | '[' [testlist] ']' | '{' [dictsetmaker] '}' | NAME | NUMBER | STRING
+### dictsetmaker: (test ':' test (',' test ':' test)* [',']) | (test (',' test)* [','])
x = (1)
x = (1 or 2 or 3)
@@ -706,6 +706,11 @@ x = {'one': 1, 'two': 2}
x = {'one': 1, 'two': 2,}
x = {'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5, 'six': 6}
+x = {'one'}
+x = {'one', 1,}
+x = {'one', 'two', 'three'}
+x = {2, 3, 4,}
+
x = x
x = 'x'
x = 123