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/079388.html below:

[Python-Dev] Adding start to enumerate()

[Python-Dev] Adding start to enumerate() [Python-Dev] Adding start to enumerate()Nick Coghlan ncoghlan at gmail.com
Tue May 13 00:32:59 CEST 2008
Georg Brandl wrote:
> I believe the following is a common use-case for enumerate()
> (at least, I've used it quite some times):
> 
> for lineno, line in enumerate(fileobject):
>     ...
> 
> For this, it would be nice to have a start parameter for enumerate().
> The changes are minimal -- okay for 2.6?

I'd like to hear from Raymond before we do this. I'm pretty sure we had 
a reason for *not* doing it that way in when enumerate() was added, but 
I can't remember what that reason might have been...

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.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