[Python-ideas] Make asyncio.get_event_loop a builtin

Chris Barker chris.barker at noaa.gov
Tue May 22 22:08:40 EDT 2018

>>To that end, I propose making asyncio.get_event_loop() a builtin.

I like the idea of making coroutines easier and use.

I do too, but ...

> Eventloop could have an .__init__ method, or be a factory function, with a
> 'loop' parameter.  The value specifies which eventloop implementation
> adaptor to use.  The default might be 'asyncio', with alternatives such as
> 'uvloop', 'tkloop' (partly prototyped), 'twisted', and others.

this is a key point -- while asyncio is in the standard library, it is not
intended to be THE async event loop implementation -- there are others
already, and hopefully that will continue (trio looks pretty cool, for

so yes to making async easier, but no to putting asycio in builtins.

even the idea of a builtin EventLoop that other implementations could
register with seems kinda pointless -- why not import the one you want?



Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180522/e5bf8f6e/attachment.html>

More information about the Python-ideas mailing list