Re: slicings: 3 questions

2009-01-29 Thread Alan G Isaac
On 1/29/2009 4:41 PM Robert Kern apparently wrote: It allows (ab)uses like numpy.mgrid: >>> mgrid[0:10:11j] array([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.]) Ah of course. Obvious now, but I had presumed some deeper magic in that syntax, not recognizing that a legitim

Re: slicings: 3 questions

2009-01-29 Thread Gabriel Genellina
En Thu, 29 Jan 2009 19:41:28 -0200, Robert Kern escribió: On 2009-01-29 15:33, Alan G Isaac wrote: On 1/29/2009 1:37 PM Chris Rebert apparently wrote: Also, more fundamentally, Python is liberal in what it allows for the parts of slices, so unifying slices with ranges would break code. For

Re: slicings: 3 questions

2009-01-29 Thread Robert Kern
On 2009-01-29 15:33, Alan G Isaac wrote: On Thu, Jan 29, 2009 at 10:01 AM, Alan G Isaac wrote: 2. It seems that slice objects and range objects are awfully similar in many ways. Is this "appearance only", or was there any discussion of unifying them? Curious for insight... On 1/29/2009 1:37

Re: slicings: 3 questions

2009-01-29 Thread Alan G Isaac
On Thu, Jan 29, 2009 at 10:01 AM, Alan G Isaac wrote: 2. It seems that slice objects and range objects are awfully similar in many ways. Is this "appearance only", or was there any discussion of unifying them? Curious for insight... On 1/29/2009 1:37 PM Chris Rebert apparently wrote: Wouldn

Re: slicings: 3 questions

2009-01-29 Thread Alan G Isaac
On Thu, Jan 29, 2009 at 10:01 AM, Alan G Isaac wrote: 1. I seem not to understand something obvious at http://docs.python.org/3.0/reference/expressions.html#slicings (I assume I'm just not reading this right.) What is an example of a slicing using a "slice_list"? On 1/29/2009 1:37 PM Chris Re

Re: slicings: 3 questions

2009-01-29 Thread Chris Rebert
On Thu, Jan 29, 2009 at 10:01 AM, Alan G Isaac wrote: > 1. I seem not to understand something obvious at > http://docs.python.org/3.0/reference/expressions.html#slicings > (I assume I'm just not reading this right.) > What is an example of a slicing using a "slice_list"? There's nothing in the st

slicings: 3 questions

2009-01-29 Thread Alan G Isaac
1. I seem not to understand something obvious at http://docs.python.org/3.0/reference/expressions.html#slicings (I assume I'm just not reading this right.) What is an example of a slicing using a "slice_list"? 2. It seems that slice objects and range objects are awfully similar in many ways. Is