[Python-checkins] r42592 - python/trunk/Lib/compiler/transformer.py
martin.v.loewis
python-checkins at python.org
Mon Feb 27 17:11:06 CET 2006
Author: martin.v.loewis
Date: Mon Feb 27 17:11:03 2006
New Revision: 42592
Modified:
python/trunk/Lib/compiler/transformer.py
Log:
Handle testlist_safe and or_test like testlist.
Modified: python/trunk/Lib/compiler/transformer.py
==============================================================================
--- python/trunk/Lib/compiler/transformer.py (original)
+++ python/trunk/Lib/compiler/transformer.py Mon Feb 27 17:11:03 2006
@@ -945,7 +945,7 @@
# loop to avoid trivial recursion
while 1:
t = node[0]
- if t == symbol.exprlist or t == symbol.testlist or t == symbol.testlist_gexp:
+ if t in (symbol.exprlist, symbol.testlist, symbol.testlist_safe, symbol.or_test, symbol.testlist_gexp):
if len(node) > 2:
return self.com_assign_tuple(node, assigning)
node = node[1]
@@ -982,7 +982,7 @@
else:
raise SyntaxError, "can't assign to literal"
else:
- raise SyntaxError, "bad assignment"
+ raise SyntaxError, "bad assignment (%s)" % t
def com_assign_tuple(self, node, assigning):
assigns = []
More information about the Python-checkins
mailing list