A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2005-October/057461.html below:

[Python-Dev] enumerate with a start index

[Python-Dev] enumerate with a start index [Python-Dev] enumerate with a start indexMichel Pelletier michel at cignex.com
Thu Oct 20 01:03:52 CEST 2005
Martin Blais wrote:
> Hi
> 
> Just wondering, would anyone think of it as a good idea if the
> enumerate() builtin could accept a "start" argument?  I've run across
> a few cases where this would have been useful.  It seems generic
> enough too.

+1, but something more useful might be a a cross between enumerate a 
zip, where you pass N iterables and it yields N-tuples.  Then you could 
do something like:

zipyield(range(10, 20), mygenerator())

and it would be like you wanted for enumerate, but starting from 10 in 
this case.

-Michel


> _______________________________________________
> 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/python-python-dev%40m.gmane.org
> 

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