update from Atlas

This commit is contained in:
Luciano Ramalho
2015-04-11 01:05:23 -03:00
parent f4cdee2447
commit 7030b56878
61 changed files with 316 additions and 13 deletions

View File

@@ -0,0 +1,13 @@
>>> def coroutine():
... print('coroutine started')
... x = yield
... print('coroutine received: {!r}'.format(x))
...
>>> coro = coroutine()
>>> next(coro)
coroutine started
>>> coro.send(42)
coroutine received: 42
Traceback (most recent call last):
...
StopIteration