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   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
            http://www.boredomandlaziness.org
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to