[docs] [issue29018] Misinformation when showing how slices work in The Tutorial
report at bugs.python.org
Mon Dec 19 18:37:31 EST 2016
Steven D'Aprano added the comment:
You haven't given any reason to explain why you think the existing docs are wrong, nor any reason why you think your version is better. Just stating that the docs give "misinformation" is not good enough.
By your matrix, 'Python'[0:-1] should take a slice starting from the left of 'P' and ending at the *right* of 'n', returning 'Python' unchanged. According to the original, documented matrix, 'Python'[0:-1] takes a slice starting at the left of 'P' and ending at the *left* of 'n', returning 'Pytho'. without the n, which is what actually does happen.
You should also consider the slice 'Python'[-6:-5] according to the documented matrix (returns 'P') and your matrix (returns 'y').
resolution: -> not a bug
stage: -> resolved
status: open -> closed
Python tracker <report at bugs.python.org>
More information about the docs