The docs at http://docs.python.org/reference/expressions.html#slicings say (with some excerpts):
5.3.3. Slicings
A slicing selects a range of items in a sequence object (e.g., a string, tuple or list).
slicing ::= simple_slicing | extended_slicing
simple_slicing ::= primary "[" short_slice "]"
extended_slicing ::= primary "[" slice_list "]"
slice_list ::= slice_item ("," slice_item)* [","]
slice_item ::= expression | proper_slice | ellipsis
proper_slice ::= short_slice | long_slice
short_slice ::= [lower_bound] ":" [upper_bound]
long_slice ::= short_slice ":" [stride]
lower_bound ::= expression
upper_bound ::= expression
stride ::= expression
ellipsis ::= "..."
The semantics for a simple slicing are as follows. The primary must evaluate to a sequence object...
The semantics for an extended slicing are as follows. The primary must evaluate to a mapping object, ...
The question:
To support [1,2,3][a:b:c]
notation the language reference requires lists to be mapping objects (the stride
is there only with "extended slicing", which is for mapping objects). So, is the language reference broken (may be they just forgot to update it upon introduction of What's New in Python2.3: Extended Slices ?)?
Also, slicing is obviously not only for sequence objects (see the first phrase above).
Or is it just me? ;)
P.S.
Interestingly, Python 3 docs at http://docs.python.org/release/3.1.3/reference/expressions.html#slicings say:
A slicing selects a range of items in a sequence object (e.g., a string, tuple or list)...
["unified" slicing definition, not differentiating between "exteneded" and "simple" here]
The semantics for a slicing are as follows. The primary must evaluate to a mapping object, ...