rfind bug ?
Jean-Michel Pichavant
jeanmichel at sequans.com
Wed Apr 21 06:13:38 EDT 2010
Stef Mientki wrote:
> On 21-04-2010 10:56, Chris Rebert wrote:
>
>> On Wed, Apr 21, 2010 at 1:51 AM, Stef Mientki <stef.mientki at gmail.com> wrote:
>>
>>
>>> With the following code, I would expect a result of 5 !!
>>>
>>>
>>>
>>>>>> a= 'word1 word2 word3'
>>>>>> a.rfind(' ',7)
>>>>>>
>>>>>>
>>> 11
>>>
>>> Is this a bug ?
>>>
>>>
>> No. Don't you think someone would have found such an obvious bug by now?
>>
>>
> if it's not a bug,
> then the start index has no meaning ...
> ... and some would call that a bug.
>
> cheers,
> Stef
>
a.rfind(' ', 12)
Out[12]: -1
looks like the start index has a meaning ...
JM
More information about the Python-list
mailing list