Documentation
The collections.abc.Sequence docs state that __getitem__
needs to be implemented, and link to some general __getitem__
docs. It states
For sequence types, the accepted keys should be integers. Optionally, they may support slice objects as well.
But the corresponding typing information requires slice support.
To resolve this, either the docs or the typing information should be adapted.
Related
#120802 (general __getitem__
docs improvements)
My corresponding question and answer on Stackoverflow