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

Petri Lehtinen report at bugs.python.org
Sun Nov 6 12:46:59 CET 2011


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

> Or am I misunderstanding?

Ah, no, sorry. I wasn't aware of this.

Now the error message set by _PyEval_SliceIndex() makes sense. It doesn't itself accept None, but apply_slice() and assign_slice() handle the None case.

There's still the question whether {list,tuple}.index() should accept None or not.

----------

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


More information about the Python-bugs-list mailing list