This makes me think that for a sequence I only need
__len__
and
__getitem__
as minimal. And indeed
__contains__
and
__iter__
are generated from those. What am I missing for
isinstance(seq, collections.abc.Sequence)
to be
True
? If I define a generator
__iter__
on a class it will recognize it as a subclass of
collections.abc.Iterable
.