> > 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