[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    slice object, ellipsis usage? list[2:4:2, ...] what good are they?
From:       Shae Erisson <shapr () uab ! edu>
Date:       2000-05-31 21:38:14
[Download RAW message or body]

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@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
-- 
http://www.python.org/mailman/listinfo/python-list

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic