[docs] provide the authorative source for s[i:j] negative slice indices (<-len(s)) behavior for standard sequences (issue 29352)

shadowranger+python at gmail.com shadowranger+python at gmail.com
Tue Jan 24 13:45:12 EST 2017

File Doc/library/stdtypes.rst (right):

Doc/library/stdtypes.rst:937: ``len(s)``. If ``len(s) + i`` or ``len(s)
+ j`` is negative, use ``0``. If *i*
I think, to avoid repetition, a footnote cross-reference might make more
sense here:

"If a negative index remains negative after substitution (Note 3), use

Or if footnote cross-references are verboten, to match the phrasing for
the previous sentence and simplify the language:

"If *i* or *j* is less than ``-len(s)``, use ``0``."


More information about the docs mailing list