Re: [Python-Dev] PEP Proposal: Revised slice objects lists use slice objects as indexes

2008-03-10 Thread Forrest Voight
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

Re: [Python-Dev] PEP Proposal: Revised slice objects lists use slice objects as indexes

2008-03-10 Thread Nick Coghlan
Forrest Voight 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

Re: [Python-Dev] PEP Proposal: Revised slice objects lists use slice objects as indexes

2008-03-10 Thread Greg Ewing
Forrest Voight wrote: Slice objects that are produced in a list index area would be different, and optionally the syntax for slices in list indexes would be expanded to work everywhere. Something like this was quite close to getting in a while back, but it was eventually dropped. Anyone

Re: [Python-Dev] PEP Proposal: Revised slice objects lists use slice objects as indexes

2008-03-10 Thread Alex Martelli
On Mon, Mar 10, 2008 at 3:57 AM, Forrest Voight [EMAIL PROTECTED] 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

[Python-Dev] PEP Proposal: Revised slice objects lists use slice objects as indexes

2008-03-09 Thread Forrest Voight
This would simplify the handling of list slices. Slice objects that are produced in a list index area would be different, and optionally the syntax for slices in list indexes would be expanded to work everywhere. Instead of being containers for the start, end, and step numbers, they would be

Re: [Python-Dev] PEP Proposal: Revised slice objects lists use slice objects as indexes

2008-03-09 Thread Alexandre Vassalotti
On Sun, Mar 9, 2008 at 7:21 PM, Forrest Voight [EMAIL PROTECTED] wrote: This would simplify the handling of list slices. Slice objects that are produced in a list index area would be different, and optionally the syntax for slices in list indexes would be expanded to work everywhere.