On 14 November 2014 07:04, Guido van Rossum <guido@python.org> wrote:

PS. If we decide not to go ahead with this, there's a small change to the semantics of "return" in a generator that might allow asyncio to distinguish between an intended return statement in the generator and an accidentally escaping StopIteration -- the return case should use a newly defined subclass of StopIteration. asyncio's _step() function can then tell the two situations apart easily.

I've only been peripherally following this, but that sounds like a good idea whether or not the rest is implemented.

Tim Delaney