[issue28882] RFC: Slice confusing with negative strides and the 0th element.

Josh Rosenberg report at bugs.python.org
Tue Dec 6 19:33:44 EST 2016


Josh Rosenberg added the comment:

I find this report nigh incomprehensible, but I will admit that I can't seem to find any good explanations of the extended slicing rules in the Python docs.

The tutorial covers slicing, but, AFAICT, it never mentions extended slicing at all, not in 3.1.2 or 3.1.3 (Strings and Lists introduction), nor anywhere in section 5 (Data structures). 3.1.2 and 3.1.3 even lie a little (claiming the implicit start is always 0, and the implicit end is always len(sequence), when those reverse for a negative slice step).

The slice object and the slice glossary entry doesn't cover it either, nor link to anything that does. The Data model entry for Slicings doesn't seem to describe meaning either.

----------
nosy: +josh.r

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


More information about the Python-bugs-list mailing list