> > Hm, maybe range() shouldn't be an iterator but an interator > > generator. No time to explain; see the discussion about restartable > > iterators. > > I think what you mean is fairly obvious. list et al. are iterator > generators, right? It's just a thing with an __iter__ function which > produces an iterator? > > If so, I tend to agree that's the right behavior for range(). > range(x,y,z) should be an immutable object. Yes. Idioms like this are used fairly often: seq = range(...) for i in seq: ... for i in seq: ... # etc. --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