[Python-Dev] Adding start to enumerate() (original) (raw)

Guido van Rossum guido at python.org
Mon May 12 03:24:58 CEST 2008


+1 to this.

On Sun, May 11, 2008 at 6:23 PM, Scott Dial <scott+python-dev at scottdial.com> wrote:

Brett Cannon wrote:

Taking a new argument that has a default shouldn't be an issue. +1 from me. I assume it is just going to start the count at that number, not advance the iterable to that point, right? I wonder if it would be best for it to be a keyword-only argument. So many of the utility functions on iterables are foo(*iterables) that I might be inclined to think enumerate(foo, bar) is equivalent to enumerate(chain(foo, bar)), but enumerate(foo, start=bar) is pretty obvious. And if you consider that the enumeration is prepended to the values of foo, enumerate(foo, bar) is "backwards." Just saying.. -Scott -- Scott Dial scott at scottdial.com scodial at cs.indiana.edu


Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org

-- --Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list