[Python-3000-checkins] r51633 - python/branches/p3yk/Lib/compiler/transformer.py

georg.brandl python-3000-checkins at python.org
Mon Aug 28 19:19:22 CEST 2006


Author: georg.brandl
Date: Mon Aug 28 19:19:22 2006
New Revision: 51633

Modified:
   python/branches/p3yk/Lib/compiler/transformer.py
Log:
Small fix for compiler module ./. set literals.



Modified: python/branches/p3yk/Lib/compiler/transformer.py
==============================================================================
--- python/branches/p3yk/Lib/compiler/transformer.py	(original)
+++ python/branches/p3yk/Lib/compiler/transformer.py	Mon Aug 28 19:19:22 2006
@@ -1185,7 +1185,7 @@
     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]))


More information about the Python-3000-checkins mailing list