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 ncoghlan
Recipients asvetlov, gvanrossum, ncoghlan, scoder, vstinner, yselivanov
Date 2015-05-12.00:03:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Latest version looks good to me (aside from a quibble about whether StopAsyncIteration should inherit from BaseException instead of Exception - see my review for details).

Based on Guido's explanation in the review, I also suggested adding the following example method to the PEP as part of the rationale for StopAsyncIteration:

    def __anext__(self):
            data = await self._get_data()
        except EOFError:
            raise StopAsyncIteration
        return data

The trick is that when __anext__ is itself a coroutine, we really do have 3 exit paths:

* suspension to wait for events (await)
* returning the next value (return)
* terminating iteration (raise StopAsyncIteration)
Date User Action Args
2015-05-12 00:03:04ncoghlansetrecipients: + ncoghlan, gvanrossum, scoder, vstinner, asvetlov, yselivanov
2015-05-12 00:03:04ncoghlansetmessageid: <>
2015-05-12 00:03:04ncoghlanlinkissue24017 messages
2015-05-12 00:03:04ncoghlancreate