Bob Ippolito <bob at redivi.com>: > This is essentially getting back to what Armin was saying.. if > iterators act more like lists, they will be easier to user and will > open up some new doors for optimization potential. Adding a way to > get the length of some iterators essentially makes them list-like or > tuple-like. But... if an iterator is sufficiently random-access to be able to report its length and produce selected items without doing anything irreversible, wouldn't it make more sense for it to be a (possibly read-only) sequence rather than an iterator in the first place? In other words, instead of e.g. dict.iteritems() there should be a dict.itemseq() or something that returns a sequence-like view of the dict. Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg at cosc.canterbury.ac.nz +--------------------------------------+
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