On 30 April 2015 at 10:48, Todd
Of course this sort of thing is possible with iterators and maps today, but I think a lot of the same advantages that apply to asyncio also apply to these sorts of cases. So I think that, rather than having a special keyword just for asyncio, I think it would be better to have a more flexible approach. Perhaps something like a "__for__" magic method that lets a class implement "for" loop handling, along with the corresponding changes in how the language processes the "for" loop.
+1 on making a more general construct than "async for", which can then be used to implement an equivalent to "async for" as well as similar constructs for threads processes and whatever else 3rd party code might find a use for. Paul