Cannot step through asynchronous iterator manually

Frank Millman frank at chagford.com
Sat Jan 30 01:03:04 EST 2016


Hi all

To loop though an iterator one usually uses a higher-level construct such as 
a 'for' loop. However, if you want to step through it manually you can do so 
with next(iter).

I expected the same functionality with the new 'asynchronous iterator' in 
Python 3.5, but I cannot find it.

I can achieve the desired result by calling 'await aiter.__anext__()', but 
this is clunky.

Am I missing something?

Frank Millman





More information about the Python-list mailing list