I've been learning Python for awhile using official Python site tutorial/library/reference. Today I just accidentally stumbled across formal slicing reference and can't figure out why nobody tells about one possible scenario that should work but unfortunately it doesn't.
Namely, according to this document it should be possible to select elements from the sequence using tuple of indexes and slices:
lst = list(range(1, 100, 2))
slc = slice(10, 20, 3)
print( lst[ 1, 5, 8, slc, 30:40:5, 49 ] )
But as many of you might expect error pops-up
Traceback (most recent call last): File "./slice-test.py", line 68, in print( lst[ 1, 5, 8, slc, 30:40:5, 49 ] ) TypeError: list indices must be integers or slices, not tuple
This notation have been present in Python for a long time. At least the same document for Python 2.x mentions this term as a "extended slicing" here
What am I missing here? I probably misinterpret this notation but I can't figure out where is the catch(except the fact that this is not supported by interpreter of course).
PS I've looked up for an answer elsewhere including this question.
PPS This question is not about indexing or start:end:step slicing per se, so examples of these are not needed.