A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-May/079410.html below:

[Python-Dev] Adding start to enumerate()

[Python-Dev] Adding start to enumerate() [Python-Dev] Adding start to enumerate()Guido van Rossum guido at python.org
Wed May 14 00:18:44 CEST 2008
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/)
More information about the Python-Dev mailing list

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