Advertisement
Guest User

Untitled

a guest
Apr 25th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. @coroutine
  2. def do_something()
  3. result = yield from some_function()
  4. return result
  5.  
  6. @coroutine
  7. def do_something()
  8. future = asyncio.Future()
  9. result = yield from some_function()
  10. future.set_result(result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement