On Tue, May 13, 2008 at 3:11 PM, Steven D'Aprano <steve at pearwood.info> wrote: > With iterators being such a fundamental part of Python these days, > perhaps one day we'll see the functions in the itertools module become > iterator methods, as happened with strings. But that's a discussion for > another day. Unlikely. Every method needs to be reimplemented for each type that is expected to support it. There are only two string types, so that's manageable. But there are many dozens of iterator types. Insisting on a common base class would be unpythonic. Plus, the functional approach makes it possible to treat various non-iterators (like sequences and other iterables) the same way. -- --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