Eric V. Smith <[email protected]> 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 look like any of the str methods use self in the
documentation.
I'm reasonably sure None is correct as the default for start and end, but I
suspect it's not universally true of str methods that None works as the
default. So it wouldn't surprise me if not all of the str methods can be
expressed in python code.
----------
nosy: +eric.smith
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue42776>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com