Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #102279 > unrolled thread

Cannot step through asynchronous iterator manually

Started by"Frank Millman" <frank@chagford.com>
First post2016-01-30 08:03 +0200
Last post2016-01-30 08:03 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Cannot step through asynchronous iterator manually "Frank Millman" <frank@chagford.com> - 2016-01-30 08:03 +0200

#102279 — Cannot step through asynchronous iterator manually

From"Frank Millman" <frank@chagford.com>
Date2016-01-30 08:03 +0200
SubjectCannot step through asynchronous iterator manually
Message-ID<mailman.113.1454133801.2338.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web