slice object, ellipsis usage? list[2:4:2, ...] what good are they?

Shae Erisson shapr at uab.edu
Wed May 31 17:38:14 EDT 2000


I recently came across the slice object, and the ellipsis.

I would guess that list[5:11:2] would pull every second item from that
slice of the list, so I think I can dig a slice object.

But, what's up with multiple slice objects being legal in a single
slice?
Take for example: list[5:23:2, ...] what the heck is that supposed to
mean?

What good is an ellipsis? what can I do with one? what's the meaning
actually supposed to be? I realize that it's a built-in type like None,
and therefore, I can assign any symbolic meaning I wish to assign to it.
But, how did it get there?
-- 
sHae mAtijs eRisson (sHae at wEbwitchEs.coM) gEnius fOr hIre
   bRing mE fIve sQuirrels aNd nO oNe wIll gEt hUrt
13:00pm up 1 season, 1 squirrel, load average: 1+1j 0.5+2j 0.2+0.5j



More information about the Python-list mailing list