Re: [Python-Dev] synchronized enumerate

2005-12-19 Thread Raymond Hettinger
[Chris or Leslie Smith] > I see that there is a thread of a similar topic that was posted recently ( > enumerate with a start index ) but thought I would start a new thread > since what I am suggesting is a little different. Try rolling your own with izip() and count(): izip(count(start),

Re: [Python-Dev] synchronized enumerate

2005-12-19 Thread Nick Coghlan
Chris or Leslie Smith wrote: > Whenever I use enumerate, I am doing so because I will use the index to > access some other element in the list (the previous or next, usually) while > also looking at the element that is returned from enumerate. Several > times, however, in the development phase of

Re: [Python-Dev] synchronized enumerate

2005-12-19 Thread Aahz
On Sun, Dec 18, 2005, Chris or Leslie Smith wrote: > > What I would propose is an optional slice argument to the enumerate > routine that would allow enumerate to return elements that are > synchronized with the original list list/iterable elements. e.g. python-dev is the wrong place to start disc

[Python-Dev] synchronized enumerate

2005-12-19 Thread Chris or Leslie Smith
I see that there is a thread of a similar topic that was posted recently ( enumerate with a start index ) but thought I would start a new thread since what I am suggesting is a little different. Whenever I use enumerate, I am doing so because I will use the index to access some other element i