[issue31021] Clarify programming faq.

2017-07-24 Thread Ashok Bakthavathsalam
Changes by Ashok Bakthavathsalam : -- pull_requests: +2904 ___ Python tracker <http://bugs.python.org/issue31021> ___ ___ Python-bugs-list mailing list Unsub

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Ashok Bakthavathsalam
New submission from Ashok Bakthavathsalam: "abcde".rindex("") returns 5 "a".rindex("") returns 1 This is not documented anywhere in the Python documentation. -- components: Library (Lib) messages: 302418 nosy: kgashok priority: normal severity:

[issue31021] Clarify programming faq.

2017-09-18 Thread Ashok Bakthavathsalam
Ashok Bakthavathsalam added the comment: So, what is the resolution on this? -- nosy: +kgashok ___ Python tracker <https://bugs.python.org/issue31021> ___ ___

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Ashok Bakthavathsalam
Changes by Ashok Bakthavathsalam : -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +docs@python ___ Python tracker <https://bugs.python.org/issu

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Ashok Bakthavathsalam
Ashok Bakthavathsalam added the comment: Also, "".rindex("") returns 0 -- ___ Python tracker <https://bugs.python.org/issue31504> ___ ___ Pyt

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Ashok Bakthavathsalam
Ashok Bakthavathsalam added the comment: string.find() also exhibits the same behaviour. "abcde".find("") -> 5 which also is not documented anywhere. -- ___ Python tracker <https://

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Ashok Bakthavathsalam
Ashok Bakthavathsalam added the comment: 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-

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Ashok Bakthavathsalam
Changes by Ashok Bakthavathsalam : -- keywords: +patch pull_requests: +3637 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Ashok Bakthavathsalam
Ashok Bakthavathsalam added the comment: I am not saying that there is a bug. As Martin points out, "it is worth making the documentation explicit." -- ___ Python tracker <https://bugs.python.o

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Ashok Bakthavathsalam
Ashok Bakthavathsalam added the comment: How about "abcde"[5] Traceback (most recent call last): File "python", line 1, in IndexError: string index out of range -- ___ Python tracker <https://bug

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Ashok Bakthavathsalam
Ashok Bakthavathsalam added the comment: Look at my suggested changes. It doesn't add noise, IMHO. All I am saying is that the explicit behaviour needs to be documented. I unnecessarily wasted at least 3-4 hours on this "undocumented

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Ashok Bakthavathsalam
Ashok Bakthavathsalam added the comment: @Storchaka, You say `5` is related to the substring. Pray, explain how 5 is related to a null substring? Also, from https://bugs.python.org/msg243710, as per the great Hettinger: Though this is closed as not a bug, feel free to add an example or a

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Ashok Bakthavathsalam
Changes by Ashok Bakthavathsalam : -- type: behavior -> enhancement ___ Python tracker <https://bugs.python.org/issue31504> ___ ___ Python-bugs-list mai