This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kgashok
Recipients docs@python, kgashok, serhiy.storchaka
Date 2017-09-18.08:57:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1505725030.18.0.0499336276531.issue31504@psf.upfronthosting.co.za>
In-reply-to
Content
The documentation (https://docs.python.org/3/library/stdtypes.html#str.find) does not describe what will be the behaviour if the substring is "". 

And by the way, as per https://docs.python.org/3/reference/expressions.html#membership-test-operations, 

    Empty strings are always considered to be a substring of any other 
    string, so "" in "abc" will return True.

Returning an invalid index value, although confusing, should at least be documented in some form.
History
Date User Action Args
2017-09-18 08:57:10kgashoksetrecipients: + kgashok, docs@python, serhiy.storchaka
2017-09-18 08:57:10kgashoksetmessageid: <1505725030.18.0.0499336276531.issue31504@psf.upfronthosting.co.za>
2017-09-18 08:57:10kgashoklinkissue31504 messages
2017-09-18 08:57:10kgashokcreate