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

Barry A. Warsaw barry@zope.com
Sun, 14 Jul 2002 10:58:02 -0400


>>>>> "GvR" == Guido van Rossum <guido@python.org> writes:

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

I think it would be fine to leave the situation as is
(i.e. undefined).  You can use the PEP to encourage a particular
behavior but I'm not sure it needs to be required ("SHOULD" in RFC
terms, but not "MUST").

-Barry