Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. def recursive_coroutine():
  2. rc = (yield)
  3. rc.send(rc)
  4.  
  5. reco = recursive_coroutine()
  6. next(reco)
  7. reco.send(reco)
  8.  
  9. Traceback (most recent call last):
  10. File "rc.py", line 7, in <module>
  11. reco.send(reco)
  12. File "rc.py", line 3, in recursive_coroutine
  13. rc.send(rc)
  14. ValueError: generator already executing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement