Terry Reedy wrote:
"Nick Coghlan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| 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...
http://bugs.python.org/issue2831
Thanks. I think this part is the main reason I see a start argument to
enumerate as potentially problematic:
"""all variants can easily be misread as starting at the nth item in the
sequence (much like islice() does now): enumerate(3, 'abcdefg') -->
(3,'d') (4,'e') (5, 'f') (6, 'g')."""
Is the need to use zip(count(3), seq) for the offset index case really
such a burden given the associated benefits in keeping the builtin
function really simple and easy to understand?
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