Author: Brian Kearns <bdkea...@gmail.com> Branch: stdlib-2.7.9 Changeset: r75000:8d5bf221300a Date: 2014-12-17 17:15 -0500 http://bitbucket.org/pypy/pypy/changeset/8d5bf221300a/
Log: try to fix translation diff --git a/pypy/interpreter/astcompiler/astbuilder.py b/pypy/interpreter/astcompiler/astbuilder.py --- a/pypy/interpreter/astcompiler/astbuilder.py +++ b/pypy/interpreter/astcompiler/astbuilder.py @@ -277,12 +277,13 @@ globs = None locs = None to_execute = self.handle_expr(exec_node.children[1]) - if isinstance(to_execute, ast.Tuple) and child_count < 4 and \ - len(to_execute.elts) in {2, 3}: - globs = to_execute.elts[1] - if len(to_execute.elts) == 3: - locs = to_execute.elts[2] - to_execute = to_execute.elts[0] + if child_count < 4: + if isinstance(to_execute, ast.Tuple) and \ + (len(to_execute.elts) == 2 or len(to_execute.elts) == 3): + globs = to_execute.elts[1] + if len(to_execute.elts) == 3: + locs = to_execute.elts[2] + to_execute = to_execute.elts[0] elif child_count >= 4: globs = self.handle_expr(exec_node.children[3]) if child_count == 6: _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit