Author: Raffael Tfirst <[email protected]>
Branch: py3.5-async
Changeset: r85696:43805b5f2878
Date: 2016-07-14 17:31 +0200
http://bitbucket.org/pypy/pypy/changeset/43805b5f2878/

Log:    set CO_GENERATOR flag in async function code

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
@@ -405,6 +405,7 @@
         oparg |= num_annotations << 16
         code, qualname = self.sub_scope(AsyncFunctionCodeGenerator, func.name, 
func,
                                         func.lineno)
+        code.co_flags |= consts.CO_GENERATOR
         self._make_function(code, oparg, qualname=qualname)
         # Apply decorators.
         if func.decorator_list:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to