Author: Raffael Tfirst <raffael.tfi...@gmail.com> Branch: py3.5-async Changeset: r85918:5a3b4f095c70 Date: 2016-07-29 22:05 +0200 http://bitbucket.org/pypy/pypy/changeset/5a3b4f095c70/
Log: Only call __await__ if it exists diff --git a/pypy/interpreter/generator.py b/pypy/interpreter/generator.py --- a/pypy/interpreter/generator.py +++ b/pypy/interpreter/generator.py @@ -309,7 +309,8 @@ if w_iterable.pycode.co_flags & consts.CO_ITERABLE_COROUTINE: return self #look at typeobject.c, change to self.space.lookup(w_manager, "__await__") - res = self.descr__await__(space) + space.lookup(self, "__await__") + res = space.get_and_call_function(w_enter, None) return self _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit