Commits

Amaury Forgeot d'Arc committed 6b76616

Refine error message to match CPython.

Comments (0)

Files changed (1)

pypy/interpreter/astcompiler/astbuilder.py

             for i in range(0, len(stmt.children) - 2, 2):
                 target_node = stmt.children[i]
                 if target_node.type == syms.yield_expr:
-                    self.error("can't assign to yield expression", target_node)
+                    self.error("assignment to yield expression not possible",
+                               target_node)
                 target_expr = self.handle_testlist(target_node)
                 self.set_context(target_expr, ast.Store)
                 targets.append(target_expr)