
Feb. 16, 2015
4:59 a.m.
On Mon, Feb 16, 2015 at 10:53 AM, Luciano Ramalho <luciano@ramalho.org> wrote:
At a high level, the behavior of send() would be like this:
def send(coroutine, value): if inspect.getgeneratorstate() == 'GEN_CREATED': next(coroutine) coroutine.send(value)
In the pseudo-code above I forgot a return statement in the last line. It should read: def send(coroutine, value): if inspect.getgeneratorstate() == 'GEN_CREATED': next(coroutine) return coroutine.send(value) Best, Luciano -- Luciano Ramalho Twitter: @ramalhoorg Professor em: http://python.pro.br Twitter: @pythonprobr