Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3.3
Changeset: r70820:5f601f8ea119
Date: 2014-04-21 18:20 +0200
http://bitbucket.org/pypy/pypy/changeset/5f601f8ea119/
Log: Fix a crash when "yield from" is present in source code. Not
correctly implemented though.
diff --git a/pypy/interpreter/astcompiler/codegen.py
b/pypy/interpreter/astcompiler/codegen.py
--- a/pypy/interpreter/astcompiler/codegen.py
+++ b/pypy/interpreter/astcompiler/codegen.py
@@ -870,6 +870,12 @@
self.load_const(self.space.w_None)
self.emit_op(ops.YIELD_VALUE)
+ def visit_YieldFrom(self, yie):
+ # XXX not correctly implemented.
+ self.update_position(yie.lineno)
+ yie.value.walkabout(self)
+ self.emit_op(ops.YIELD_VALUE)
+
def visit_Num(self, num):
self.update_position(num.lineno)
self.load_const(num.n)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit