From b3fa66fe30c66adbbd54588f390c4d332285880d Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 28 Aug 2006 17:19:22 +0000 Subject: [PATCH] Small fix for compiler module ./. set literals. --- Lib/compiler/transformer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py index 42640e8191..db571dbe04 100644 --- a/Lib/compiler/transformer.py +++ b/Lib/compiler/transformer.py @@ -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])) -- 2.40.0