On Tue, Jul 16, 2002, Delaney, Timothy wrote: > From: Aahz [mailto:aahz@pythoncraft.com] >> On Tue, Jul 16, 2002, Delaney, Timothy wrote: >>> >>> I think the definition that some people are using is: > ^^^^^ >>> >>> An exhausted iterator is one for which StopIteration has >>> >>> An empty iterator OTOH is one which will raise >> >> In order to draw this distinction, you have to change the definition >> of "iterator" that we've been using. The sole protocol of iterator >> to date has been the existence of a next() method that either returns >> an item or raises StopIteration. Making statements about what an >> iterator *will* do counts as abuse IMO. If you want a feature >> like that, go use something else -- don't break the simplicity of >> iterators. > > Aahz - you did read the next paragraph didn't you. > > "... I don't see a lot of point in distinguishing between the two > above cases." Sorry for being unclear; that was the generic "you", not pointing at you (Tim) specifically. s/you/one/ -- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ Project Vote Smart: http://www.vote-smart.org/
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