Yury Selivanov added the comment:

Thanks for the review Nick.  I committed the patch with some additional minor 
fixes, including your suggestion.

> Asynchronous iterator question: should the typical pattern for those be:

    def __aiter__(self):
        return self
    def __await__(self):
        return self


Well, adding __await__ to asynchronous iterators is the same as adding __call__ 
to regular iterators.  It would be like:

    i = iter(iterable)               # __iter__
    i = iterable()                   # __call__
   
    ai = await iterable.__aiter__()  # __aiter__
       # or "ai = await aiter(iterable)", but we don't have it yet

    ai = await iterable              # __await__


> "Did we put the ABC's in the right place?" question: reviewing the draft docs 
> meant I just noticed that collections.abc is quite an odd home for some of 
> these. Probably not worth worrying about, given that AsyncIterator and 
> AsyncIterable do belong, and the others are building blocks for those.

I had this question too.  My impression is that Guido doesn't want to fix this 
in 3.5.  FWIW, my initial suggestion was to have "Coroutine", "Awaitable" and 
"Hashable" in the top-level "abc" module (not ideal by any means).

----------

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

Reply via email to