> Why not change enumerate() to return an iterable, rather than an > iterator? Then its __reversed__ method could attempt to delegate to > the underlying iterable. Is it likely that anyone relies on > enumerate() being an iterator, rather than an iterable? I find it rather elegant to use enumerate() on a file to generate line numbers and lines together (adding 1 to the index to produce a more conventional line number). What's more elegant than for i, line in enumerate(f): print i+1, line, to print a file with line numbers??? I've used this in throwaway code at least, and would hate to lose it. --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