Small fix for compiler module ./. set literals.
This commit is contained in:
parent
17ab9a02b5
commit
b3fa66fe30
@ -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]))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user