Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
BiteCode_dev
· 6y ago · 0 comments
For even more fun, use async def + await, and you save yourself the while loop since that what the asyncio.run() does for you.
Comments
[–]
qqssccfftt
6y ago
asyncio will get confused as to why youre yielding random things and it won't work
[–]
BiteCode_dev
OP
6y ago
No, you just wrap it in a Future.
[–]
qqssccfftt
6y ago
So now you have even more confusing code. Good work!