Re: Slice lists and extended slicing

2011-01-26 Thread Terry Reedy
On 1/26/2011 12:52 PM, Benjamin Kaplan wrote: If you're trying to learn a language, I would suggest reading tutorials, not the grammar. I second that. As you can see from the error thrown, the operation is syntactically valid (you don't get a syntax error). It's just that lists don't accept

Re: Slice lists and extended slicing

2011-01-26 Thread Emile van Sebille
On 1/26/2011 9:20 AM Gerald Britton said... I'm looking at extended slicing and wondering when and how to use slice lists: I think the use of the term slice_list below is simply as the content between the encompassing brackets, eg in mylist[1:2:3] slice_list refers to 1:2:3. So, you don't ac

Re: Slice lists and extended slicing

2011-01-26 Thread Chris Rebert
On Wed, Jan 26, 2011 at 9:20 AM, Gerald Britton wrote: > I'm looking at extended slicing and wondering when and how to use slice lists: > > slicing          ::=  simple_slicing | extended_slicing > simple_slicing   ::=  primary "[" short_slice "]" > extended_slicing ::=  primary "[" slice_list "]"

Re: Slice lists and extended slicing

2011-01-26 Thread Robert Kern
On 1/26/11 11:20 AM, Gerald Britton wrote: I'm looking at extended slicing and wondering when and how to use slice lists: slicing ::= simple_slicing | extended_slicing simple_slicing ::= primary "[" short_slice "]" extended_slicing ::= primary "[" slice_list "]" slice_list ::

Re: Slice lists and extended slicing

2011-01-26 Thread Benjamin Kaplan
On Wed, Jan 26, 2011 at 12:20 PM, Gerald Britton wrote: > I'm looking at extended slicing and wondering when and how to use slice lists: > > slicing          ::=  simple_slicing | extended_slicing > simple_slicing   ::=  primary "[" short_slice "]" > extended_slicing ::=  primary "[" slice_list "]

Slice lists and extended slicing

2011-01-26 Thread Gerald Britton
I'm looking at extended slicing and wondering when and how to use slice lists: slicing ::= simple_slicing | extended_slicing simple_slicing ::= primary "[" short_slice "]" extended_slicing ::= primary "[" slice_list "]" slice_list ::= slice_item ("," slice_item)* [","] slice_i