[docs] extended slice behavior inconsistent with docs (issue 1446619)

iwabako at gmail.com iwabako at gmail.com
Tue Sep 23 16:20:33 CEST 2014


Added comment on the patch proposed by bethard.
This patch has been open for 3+ years, can we proceed it as it's still
an issue in the current document?


http://bugs.python.org/review/1446619/diff/2262/Doc/library/stdtypes.rst
File Doc/library/stdtypes.rst (right):

http://bugs.python.org/review/1446619/diff/2262/Doc/library/stdtypes.rst#newcode959
Doc/library/stdtypes.rst:959: negative.  If *i* or *j* are omitted or
``None``, they become
According to this description, when *i* or *j* is equal to ``len(s)``
and *k* is negative, *i* (or *j*) remains to be ``len(s)``, but it
should be ``len(s) - 1``.

We should say something like this:

When *k* is positive and *i* (or *j*) is greater than ``len(s)``, *i*
(*j*) becomes ``len(s)``. When *k* is negative and *i* (or *j*) is equal
to or greater than ``len(s)``, *i* (*j*) becomes ``len(s) - 1``.

http://bugs.python.org/review/1446619/


More information about the docs mailing list