Re: [Numpy-discussion] getitem and slice

2010-11-15 Thread Robert Kern
On Mon, Nov 15, 2010 at 08:57, Keith Goodman wrote: > There is more than one way to form the same slice. For example, a[:2] > and a[0:2] and a[0:2:] pass slice objects to getitem with the same > start, stop and step. Not quite correct. a[:2] passes slice(None, 2, None) whereas the next two pass s

[Numpy-discussion] getitem and slice

2010-11-15 Thread Keith Goodman
There is more than one way to form the same slice. For example, a[:2] and a[0:2] and a[0:2:] pass slice objects to getitem with the same start, stop and step. Is there any way to get a hold of the exact character sequence the user used to form the slice? That is, I'd like to know if the user entere