[issue28197] range.index mismatch with documentation

Vedran Čačić report at bugs.python.org
Mon Sep 19 01:15:54 EDT 2016


Vedran Čačić added the comment:

Yes, I agree these are useless _if you know you're dealing with range_. However, if you have a Sequence, it would be very useful not to have range be a special case.

Of course, one solution is to have a default .index implementation in the Sequence ABC itself, but still I'd argue that range can implement the 3-arg .index much better than generic Sequence.

----------

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


More information about the Python-bugs-list mailing list