[issue8551] Start argument for str.rfind used incorrectly

2010-04-27 Thread R. David Murray
R. David Murray added the comment: I thought Benjamin's answer was crazy until I looked at the help for find/rfind. The optional 'start, end' arguments are interpreted like slice notation, so it does make sense to have the interpretation be the consistent between find and rfind. --

[issue8551] Start argument for str.rfind used incorrectly

2010-04-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: This is in intentional for consistency with find(). -- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed ___ Python tracker ___

[issue8551] Start argument for str.rfind used incorrectly

2010-04-27 Thread David Albert Torpey
New submission from David Albert Torpey : The purpose of the start argument in str.find() and str.rfind() is to allow for repeated searches. >>> def find_third_occurrence(s, value): ... p = s.find(value) ... p = s.find(value, p+1) ... return s.find(value, p+1) ... >>> find_third_o