[issue38955] Non indemnpotent behavior of asyncio.get_event_loop and asyncio.run sequence.

Matthias Bussonnier report at bugs.python.org
Thu Dec 5 11:47:36 EST 2019


Matthias Bussonnier <bussonniermatthias at gmail.com> added the comment:

Thanks Andrew; 

I'd still would love to have a way to get the current eventloop outside of async code that is consistent. 

I guess throwing an error with `get_event_loop()` is ok, it's just that `RuntimeError` feel like a weird thing to catch.

Alternatively is the current event loop is None I feel like returning None would also make sens imho. 

Feel free to close if you think this will not get fixed/updated.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38955>
_______________________________________


More information about the Python-bugs-list mailing list