summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-08-28 17:19:22 (GMT)
committerGeorg Brandl <georg@python.org>2006-08-28 17:19:22 (GMT)
commitb3fa66fe30c66adbbd54588f390c4d332285880d (patch)
tree9c972069917cd15ef53af7ba07e942d09041bf5c
parent17ab9a02b53691d9968bcd1fa09560a9ffe3e514 (diff)
downloadcpython-b3fa66fe30c66adbbd54588f390c4d332285880d.zip
cpython-b3fa66fe30c66adbbd54588f390c4d332285880d.tar.gz
cpython-b3fa66fe30c66adbbd54588f390c4d332285880d.tar.bz2
Small fix for compiler module ./. set literals.
-rw-r--r--Lib/compiler/transformer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py
index 42640e8..db571db 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]))