[Python-Dev] Re: [Python-checkins] python/dist/src/Objectslistobject.c,2.153,2.154
Walter Dörwald
walter@livinglogic.de
Tue, 17 Jun 2003 16:37:09 +0200
Walter Dörwald wrote:
> Neal Norwitz wrote:
>
>> Moving to python-dev.
>>
>> [...]
>> While overall I think the idea is worthwhile, I have two concerns:
>> * the doc wasn't updated
>> * negative indices are handled differently:
>>
>> >>> 'abc'.split().index('a', -3)
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in ?
>> ValueError: list.index(x): x not in list
>> >>> 'abc'.index('a', -3)
>> 0
>>
>> Neal
>
> I'm working on a fix for this.
Guido was faster! ;)
The documentation doesn't have to be fixed, because it states
that index() works like find(), which it does now.
Bye,
Walter Dörwald