This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yselivanov
Recipients asvetlov, gvanrossum, ncoghlan, python-dev, vstinner, yselivanov
Date 2015-05-21.15:55:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1432223734.41.0.46244961647.issue24180@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2015-05-21 15:55:34yselivanovsetrecipients: + yselivanov, gvanrossum, ncoghlan, vstinner, asvetlov, python-dev
2015-05-21 15:55:34yselivanovsetmessageid: <1432223734.41.0.46244961647.issue24180@psf.upfronthosting.co.za>
2015-05-21 15:55:34yselivanovlinkissue24180 messages
2015-05-21 15:55:34yselivanovcreate