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

Éric Araujo report at bugs.python.org
Sun Nov 21 01:46:11 CET 2010

Éric Araujo <merwok at netwok.org> added the comment:

Patch committed in r86625 (py3k), r86627 (3.1) and r86627 (2.7).

Regarding API conformance, I ran this simple test, courtesy of Daniel in msg109784:

>>> for cls in str, bytes, bytearray, list, tuple, range:
...     print(cls, [method for method in set(dir(collections.Sequence)) - set(dir(cls)) if not method.startswith('_')])
<class 'str'> []
<class 'bytes'> []
<class 'bytearray'> []
<class 'list'> []
<class 'tuple'> []
<class 'range'> []

Which means we can close this.  Thanks everyone!

resolution: accepted -> fixed
stage: needs patch -> committed/rejected
status: open -> closed

Python tracker <report at bugs.python.org>

More information about the docs mailing list