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 <>
The documentation ( does not describe what will be the behaviour if the substring is "". 

And by the way, as per, 

    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.
Date User Action Args
2017-09-18 08:57:10kgashoksetrecipients: + kgashok, docs@python, serhiy.storchaka
2017-09-18 08:57:10kgashoksetmessageid: <>
2017-09-18 08:57:10kgashoklinkissue31504 messages
2017-09-18 08:57:10kgashokcreate