Alex Martelli wrote: > Apart from this, "indices" suggests you're getting ONLY indices -- > while when you iterate on this type you get indices AND contents. Neil Schemenauer wrote: > Ah, I misunderstood what this unnamed function does. I was thinking it > works like .keys() on dictionaries. You're telling me it works like > ..items(). In that case I don't like enumerate() or itemize(). :-( Eh, this is the definition from the PEP: def enumerate(collection): 'Generates an indexed series: (0,coll[0]), (1,coll[1]) ...' i = 0 it = iter(collection) while 1: yield (i, it.next()) i += 1 (And enumerate() gets a +1 from me.) Just
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