
March 10, 2008
6:21 p.m.
On Mon, Mar 10, 2008 at 3:57 AM, Forrest Voight <voights@gmail.com> wrote:
I am not sure what you are trying to propose here. The slice object isn't special, it's just a regular built-in type.
The idea is to have slice objects be generators. You could make a slice like 1:10:2 , and that would make a slice object which could be used as a list index. The list would return a list with the corresponding item for every index in the generator. Then, lists could
And what indices would the slice 1:-1 return, for example? Your proposal can't play well with slices including negative indices. Also, your desired use case of alist[indices] is already pretty well covered by [alist[i] for i in indices]. Alex