Serhiy Storchaka added the comment: 5 is not valid index of character, but it is valid index of substring.
IMHO documenting explicitly miscellaneous particular cases which are not exceptions of general rules just adds a noise. This makes the documentation larger and decrease the chance that it will be read. ---------- nosy: +r.david.murray, rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31504> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com