I see. I had understood it as /sorted/ sequence.

While the original code seemingly (see below) guarantees that all items have an immutable order (when modifications of the order are not explicitly made), it does so by also excluding items satisfying this property. Similarly, your comment is leading to the observation that `dict` is not the only possible mapping. `collections.OrderedDict` would go as a "sequence", since mappings are accompanied by a warning. [note: I am unsure that the persistence of the structure is required to make an object ordered, which would mean that `xrange` (Python 2) and `range` (Python 3) would qualify)].

While I initially looked into this because of `array.array`, an sequence in the Python stdlib, I felt like generalization would be beneficial.

At the C level there is `PySequence_Check()` and `PyMapping_Check()`. Interestingly I don't think that there is an equivalent at the Python level... may be design decision made to encourage duck-typing. Anyway, while `PyMapping_Check()` is the most interesting source of information about what to check: https://github.com/python-git/python/blob/master/Objects/abstract.c#L2387 . `PySequence_Check()` is here: https://github.com/python-git/python/blob/master/Objects/abstract.c#L1806 there is no way to ensure that the property is satisfied.

I'd argue that the requirement for orderedness should be mentioned in the documention, and that `extract_index()` (should be called `build_index()`, really) relaxes its test for mapping and sequences in order to allow. The argument about guarantee does not hold, as shown right below (before the crowd starts brandishing torches and pitchforks, I'd like to stress that the argumentation is moving to the ground of proofs and certainties, and that the sole purpose of the example is to show that there is none - the real argumentation should be around practicality): 
```python
class MyWeirdList(list):
    def __getitem__(self, i):
        return super(MyWeirdList, self).__getitem__(0)    
```
```python
>>> l = MyWeirdList(range(5))
>>> l[3]
0
>>> isinstance(l, list)
True
```