[issue13340] list.index does not accept None as start or stop

Petri Lehtinen report at bugs.python.org
Sat Nov 5 21:23:11 CET 2011

Petri Lehtinen <petri at digip.org> added the comment:

The same issue exists for tuples:

>>> (1, 2, 3).index(2, None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: slice indices must be integers or None or have an __index__ method

components: +Interpreter Core
nosy: +petri.lehtinen
stage:  -> needs patch
versions: +Python 3.3

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list