A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-July/026477.html below:

[Python-Dev] Termination of two-arg iter()

[Python-Dev] Termination of two-arg iter() [Python-Dev] Termination of two-arg iter()Guido van Rossum guido@python.org
Sun, 14 Jul 2002 09:20:51 -0400
> > What about raising IndexError by default when someone attempts to call
> > .next() on an iterator already raising StopIteration?
> 
> +1
> 
> IndexError is probably better than inventing a new exception. The
> description of what actually happened would be in the exception
> text.

-1.  IndexError belongs to sequences.  I don't like the idea of
raising another exception at all -- we should either keep things the
way they are, or continue to raise StopIteration forever once it's
been raised.  Other suggestions don't make sense to me.

--Guido van Rossum (home page: http://www.python.org/~guido/)




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