Skip to content

Instantly share code, notes, and snippets.

@richardkiss
Created April 2, 2014 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richardkiss/9929467 to your computer and use it in GitHub Desktop.
Save richardkiss/9929467 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
"""
This works fine in Python 3.3, but causes a strange error in Python 3.4.0:
TypeError: send() takes 2 positional arguments but 3 were given
"""
import asyncio
def t1(q):
yield from asyncio.sleep(0.5)
q.put_nowait((1, 2))
def t2(q):
v = yield from q.get()
print(v)
q = asyncio.Queue()
asyncio.get_event_loop().run_until_complete(asyncio.wait([t1(q), t2(q)]))
@richardkiss
Copy link
Author

I can't reproduce this problem now. Argh!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment