[Python-ideas] List Revolution

Steven Klass sklass at pointcircle.com
Mon Sep 12 23:36:41 CEST 2011

Stop - please for all of mankind - stop this thread…


Steven Klass

(480) 225-1112
sklass at pointcircle.com

On Sep 12, 2011, at 2:26 PM, Terry Reedy wrote:

> On 9/12/2011 2:05 AM,
> mike.w.meyer at gmail.com wrote:
>> Ok, how about enhancing the list type to allow specifying an offset,
> Because then every list index/slice access would require more time to subtract the offset.
>> defaulting to 0? The offset should be positive, and that many
>> elements simple aren't there. Asking for an element that isn't there,
>> or a slice including such an element, raises value error exception.
> Slicing never raises a ValueError. In particular, seq[0:1] always returns a sequence with 1 or 0 items. This is an important feature.
>> The iterators&  etc for this list would all start at offset instead
>> of zero.
> Write a list subclass. Decide how you would handle indexing from the right (currently all negative indexes) and implement that.
> -- 
> Terry Jan Reedy
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20110912/8ef956fd/attachment.html>

More information about the Python-ideas mailing list