[docs] [issue9746] All sequence types support .index and .count

Iuri Diniz report at bugs.python.org
Sat Nov 20 22:45:41 CET 2010


Iuri Diniz <iuridiniz at gmail.com> added the comment:

Is this bug valid? 

I have checked that only bytearray, bytes, list, range, str and tuple are valid sequence types [using issubclass(type, collections.Sequence)] and all of them has index and count methods... 

I'm working on a script to discovery what types that are not collections.Sequence ABC yet, but must be.

Merwork said the docs are the authoritative reference to define what classes are sequences and one way to discovery it is by comparing the set of methods of each concrete class with the methods of collections.Sequence

----------
nosy: +iuridiniz

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9746>
_______________________________________


More information about the docs mailing list