Author: Colin Valliant <alcarithe...@gmail.com> Branch: pep526 Changeset: r93910:89c267ae1715 Date: 2018-02-12 23:29 -0800 http://bitbucket.org/pypy/pypy/changeset/89c267ae1715/
Log: Add minimal update to comprehensions to produce valid AST nodes for new asdl. 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 @@ -1315,7 +1315,8 @@ expr = self.handle_expr(comp_node.get_child(3)) assert isinstance(expr, ast.expr) if for_node.num_children() == 1: - comp = ast.comprehension(for_targets[0], expr, None) + # FIXME: determine whether this is actually async + comp = ast.comprehension(for_targets[0], expr, None, 0) else: # Modified in python2.7, see http://bugs.python.org/issue6704 # Fixing unamed tuple location @@ -1324,7 +1325,8 @@ col = expr_node.col_offset line = expr_node.lineno target = ast.Tuple(for_targets, ast.Store, line, col) - comp = ast.comprehension(target, expr, None) + # FIXME: determine whether this is actually async + comp = ast.comprehension(target, expr, None, 0) if comp_node.num_children() == 5: comp_node = comp_iter = comp_node.get_child(4) assert comp_iter.type == syms.comp_iter _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit