[issue34728] deprecate *loop* argument for asyncio.sleep

Andrew Svetlov report at bugs.python.org
Tue Oct 2 04:22:53 EDT 2018


Andrew Svetlov <andrew.svetlov at gmail.com> added the comment:

My understanding is:

`loop` argument passed to sleep should be always the same as returned from `get_running_loop()`.

Passing it explicitly can be considered as microoptimization but `get_running_loop()` is pretty fast now, no need for such micro-opts.

On another hand passing *non-current* loop is a serious error: nothing prevents to do it but the code just hangs.

----------

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


More information about the Python-bugs-list mailing list