Hello, I'm trying to understand and link asyncio with ordinary coroutines. Now 
I just want to understand how to do this on asyncio:


def foo():
    data = yield 8
    print(data)
    yield "bye"
    
def bar():
    f = foo()
    n = f.next()
    print(n)
    message = f.send("hello")
    print(message)


What is the equivalent for coro.send("some data") in asyncio?

coro.send on an asyncio coroutine throws AssertionError: yield from wasn't used 
with future.


Thank you
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to