Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (9 sloc) 224 Bytes
from coroutinedec import coroutine
@coroutine
def echo_emphasis():
while True:
s = (yield)
print("{s}!".format(s=s))
e = echo_emphasis()
e.send("Hello, world")
e.send("I am leaving now")