Skip to content

Commit d4cc863

Browse files
Seq slicing desc. now allows 3rd party views
By previous description, NumPy's `ndarray` wasn't a sequence
1 parent ef4aff1 commit d4cc863

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/reference/datamodel.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,9 @@ but ``a[-n-1]`` doesn't exit.
316316
.. index:: single: slicing
317317

318318
Sequences also support slicing: ``a[start:stop]`` selects all items with index
319-
*i* such that ``start <= i < stop``. When used as an expression, a slice is a
320-
sequence of the same type. The comment above about negative indexes also applies
319+
*i* such that ``start <= i < stop``. When used as an expression, a slice should be
320+
a sequence of the same type, but must be a sequence behaving as one.
321+
The comment above about negative indexes also applies
321322
to negative slice positions.
322323

323324
Some sequences also support "extended slicing" with a third *step* parameter:

0 commit comments

Comments
 (0)