Commit 4b08348f authored by Georg Brandl's avatar Georg Brandl

Small fix for compiler module ./. set literals.

parent 3b849e13
...@@ -1185,7 +1185,7 @@ class Transformer: ...@@ -1185,7 +1185,7 @@ class Transformer:
def com_dictsetmaker(self, nodelist): def com_dictsetmaker(self, nodelist):
# dictsetmaker: (test ':' test (',' test ':' value)* [',']) | (test (',' test)* [',']) # dictsetmaker: (test ':' test (',' test ':' value)* [',']) | (test (',' test)* [','])
items = [] items = []
if nodelist[2] != ':': if len(nodelist) == 1 or nodelist[1] != ':':
# it's a set # it's a set
for i in range(1, len(nodelist), 2): for i in range(1, len(nodelist), 2):
items.append(self.com_node(nodelist[i])) items.append(self.com_node(nodelist[i]))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment