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/026453.html below:

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

[Python-Dev] Termination of two-arg iter() [Python-Dev] Termination of two-arg iter()Fredrik Lundh fredrik@pythonware.com
Sat, 13 Jul 2002 21:38:31 +0200
tim wrote:

> The question is whether this is intentional:  for all other iterators Python
> supplies, StopIteration is a "sink state":  once an iterator raises
> StopIteration, calling its next() method any number of times again will just
> continue raising StopIteration.

except SRE's finditer method, that is (also reported on c.l.python)

> Or is that left up to the discretion of the iterator?

if you don't know, it probably is undefined, which means that SRE's
finditer does the best thing possible: accept a few misakes, and then
punish the poor fool who cannot follow instructions. (but to be nice,
cut them a bit more slack if they're to cheap to buy a real operating
system ;-)

</F>





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