Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm using a lot of `asyncio.get_event_loop().create_task(...)` calls without assigning the task to a variable, but the docs [0] don't mention anything regarding this method on the loop object. Can I assume that I'm safe?

[0] https://docs.python.org/3/library/asyncio-eventloop.html?hig...



I'm pretty sure that's equivalent to asyncio.create_task(), it just gives you the opportunity to specify a different loop if needed. I think the docs are just less explicit because they're aimed more at power users (since most people don't deal with multiple event loops).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: