[docs] [issue29254] Documentation Error

Ammar Askar report at bugs.python.org
Thu Jan 12 12:04:49 EST 2017


Ammar Askar added the comment:

Given `slice[start:end]`:

What this line is trying to say is that the slice index is inclusive for the start parameter and exclusive for the end parameter.

In mathematical/interval notation this would look like [start, end)

As a quick example look at the word "Python"
Index  012345
Letter Python

If you do word[:2], the result is 'Py', notice how the t is excluded.

----------
nosy: +ammar2
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29254>
_______________________________________


More information about the docs mailing list