diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-02-27 16:11:03 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-02-27 16:11:03 (GMT) |
commit | 16c7f713807a4c2acdf811fccf212d9d0901b9b9 (patch) | |
tree | 7087f1d2854b46733849601c18be986ffeffd197 /Lib/compiler | |
parent | 49a130295289174d32df603217dee0f00e874a5a (diff) | |
download | cpython-16c7f713807a4c2acdf811fccf212d9d0901b9b9.zip cpython-16c7f713807a4c2acdf811fccf212d9d0901b9b9.tar.gz cpython-16c7f713807a4c2acdf811fccf212d9d0901b9b9.tar.bz2 |
Handle testlist_safe and or_test like testlist.
Diffstat (limited to 'Lib/compiler')
-rw-r--r-- | Lib/compiler/transformer.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py index 65a69d4..3f631fe 100644 --- a/Lib/compiler/transformer.py +++ b/Lib/compiler/transformer.py @@ -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 = [] |