Yury Selivanov added the comment:

I think the original idea was to document that all methods of the loop are 
coroutines, so that:

1. if a user needs a Future object they call ensure_future: 

   fut = asyncio.ensure_future(loop.method())

2. it gives us ability to refactor things. For instance, sock_connect was a 
method that returned Futures, but at one point of 3.5 we changed it to be 
coroutine.  Because the method was documented as a coroutine, it wasn't 
strictly a backwards incompatible way.

In general, I think it would be safer for us to simple make all loop methods 
coroutines. Or, less radical, just keeping the status quo: document everything 
as a coroutine.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29344>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to