mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
Small fix for compiler module ./. set literals.
This commit is contained in:
parent
17ab9a02b5
commit
b3fa66fe30
1 changed files with 1 additions and 1 deletions
|
@ -1185,7 +1185,7 @@ class Transformer:
|
|||
def com_dictsetmaker(self, nodelist):
|
||||
# dictsetmaker: (test ':' test (',' test ':' value)* [',']) | (test (',' test)* [','])
|
||||
items = []
|
||||
if nodelist[2] != ':':
|
||||
if len(nodelist) == 1 or nodelist[1] != ':':
|
||||
# it's a set
|
||||
for i in range(1, len(nodelist), 2):
|
||||
items.append(self.com_node(nodelist[i]))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue