We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68aa560 commit c2f19adCopy full SHA for c2f19ad
Doc/reference/datamodel.rst
@@ -321,8 +321,9 @@ sequence of the same type. The comment above about negative indexes also applies
321
to negative slice positions.
322
323
Some sequences also support "extended slicing" with a third *step* parameter:
324
-``a[start:stop:step]`` selects all items of *a* with index *i* where
325
-``i = start + n*step``, ``n >= 0`` and ``start <= i < stop``.
+``a[start:stop:step]`` selects all items of *a* with index *i*, where
+``i = start + n*step`` and ``0 <= n``, such that ``start <= i < stop`` for
326
+``0 <= step``, and ``stop < i <= start`` for ``step < 0``.
327
328
Sequences are distinguished according to their mutability:
329
0 commit comments