Kaydet (Commit) 16c7f713 authored tarafından Martin v. Löwis's avatar Martin v. Löwis

Handle testlist_safe and or_test like testlist.

üst 49a13029
......@@ -945,7 +945,7 @@ class Transformer:
# 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 @@ class Transformer:
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 = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment