[issue42776] The string find method shows the problem

2020-12-29 Thread Eric V. Smith
Eric V. Smith added the comment: 'abcddd'.find('a', start=0) would appear to be allowed from the help text, but it isn't legal. This is because .find() does not allow keyword arguments. It looks like find could be documented as find(self, sub, start=None, end=None, /) Although it doesn't

[issue42776] The string find method shows the problem

2020-12-28 Thread ye andy
ye andy added the comment: When I say True here, I'm not talking about querying, I'm talking about syntax, as far as I know, document is supposed to support keyword arguments, but it doesn't Steven D'Aprano 于2020年12月29日周二 上午11:36写道: > > Steven D'Aprano added the comment: > > # True >

[issue42776] The string find method shows the problem

2020-12-28 Thread Steven D'Aprano
Steven D'Aprano added the comment: # True data.find('a', 0) That will return 0, not True. # False data.find('a', start=0) And that will raise TypeError, not return False. What exactly are you reporting here? I have read your bug report, and looked at the screen shot, and I have no idea

[issue42776] The string find method shows the problem

2020-12-28 Thread andy ye
New submission from andy ye : data = 'abcddd' # True data.find('a', 0) # False data.find('a', start=0) # document class str(obj): def find(self, sub, start=None, end=None): # real signature unknown; restored from __doc__ """ S.find(sub[, start[, end]]) -> int