GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • [Python-Dev] Adding start to enumerate()
  • [Python-Dev] Adding start to enumerate()
  • [ date ]
  • [ thread ]
  • [ subject ]
  • [ author ]

This view

  • Original page
  • New address

GeezerVison is showing mail.python.org — [Python-Dev] Adding start to enumerate()

[Python-Dev] Adding start to enumerate()

Nick Coghlan ncoghlan at gmail.com
Tue May 13 11:40:57 CEST 2008

  • Previous message: [Python-Dev] Adding start to enumerate()
  • Next message: [Python-Dev] Adding start to enumerate()
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

Terry Reedy wrote:
> "Nick Coghlan" <ncoghlan at gmail.com> wrote in message 
> news:4828C59B.8070008 at gmail.com...
> | 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   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org

  • Previous message: [Python-Dev] Adding start to enumerate()
  • Next message: [Python-Dev] Adding start to enumerate()
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

More information about the Python-Dev mailing list
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.