A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2000-August/008629.html below:

[Python-Dev] iterators

[Python-Dev] iterators [Python-Dev] iteratorsThomas Wouters thomas@xs4all.net
Mon, 21 Aug 2000 12:59:44 +0200
On Mon, Aug 21, 2000 at 12:43:47PM +0200, Fredrik Lundh wrote:
> mal wrote:
> > How about a third variant:
> > 
> > #3:
> > __iter = <object>.iterator()
> > while __iter:
> >    <variable> = __iter.next()
> >    <block>

> how does that one terminate?

__iter should evaluate to false once it's "empty". 

-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4