<div dir="ltr"><div><div>I've report<a href="http://bugs.python.org/issue16728" target="_blank"> http://bugs.python.org/issue16728</a> , but I am confused<br>about what is the sequence now.<br><br><br></div>Glossary defines sequence as iteratable having __getitem__ and __len__.<br>

</div>Objects doesn't have __iter__ is iterable when it having __getitem__.<br><div><br><a href="http://docs.python.org/3/reference/datamodel.html">http://docs.python.org/3/reference/datamodel.html</a> says:<br><br>> Sequences also support slicing: <tt class=""><span class="">a[i:j]</span></tt> selects all items with index <em>k</em> such
that <em>i</em> <tt class=""><span class=""><=</span></tt> <em>k</em> <tt class=""><span class=""><</span></tt> <em>j</em>.  When used as an expression, a slice is a
sequence of the same type.  This implies that the index set is renumbered so
that it starts at 0.<br><div><div><br></div><div>But I think this sentence explains about standard types and not definition of sequence.<br><br></div><div><br><a href="http://docs.python.org/3/library/collections.abc.html">http://docs.python.org/3/library/collections.abc.html</a> says:<br>

<br>> This module provides <a class="" href="http://docs.python.org/3/glossary.html#term-abstract-base-class"><em class="">abstract base classes</em></a> that
can be used to test whether a class provides a particular interface; for
example, whether it is hashable or whether it is a mapping.<br><br></div><div>And collections.abc.Sequence requires "index()" and "count()".<br></div><br><div>What is the requirement for calling something is "sequence"?<br>

<br><div>Off Topc: Sequence.__iter__ uses __len__ and __getitem__ but default iterator uses only __getitem__. This difference is ugly.<br></div><div><br></div><br></div><div>-- <br>INADA Naoki  <<a href="mailto:songofacandy@gmail.com" target="_blank">songofacandy@gmail.com</a>>
</div></div></div></div>