Fixed comparison: i < k < j should be i <= k < j.

This commit is contained in:
Guido van Rossum 1992-06-03 17:58:43 +00:00
parent c7ff85d612
commit 54e39908d8
2 changed files with 2 additions and 2 deletions

View File

@ -674,7 +674,7 @@ the numbers $0, 1, \ldots, n-1$. Element \verb\i\ of sequence
\index{subscription}
Sequences also support slicing: \verb\a[i:j]\ selects all elements
with index $k$ such that $i < k < j$. When used as an expression,
with index $k$ such that $i <= k < j$. When used as an expression,
a slice is a sequence of the same type --- this implies that the
index set is renumbered so that it starts at 0 again.
\index{slicing}

View File

@ -674,7 +674,7 @@ the numbers $0, 1, \ldots, n-1$. Element \verb\i\ of sequence
\index{subscription}
Sequences also support slicing: \verb\a[i:j]\ selects all elements
with index $k$ such that $i < k < j$. When used as an expression,
with index $k$ such that $i <= k < j$. When used as an expression,
a slice is a sequence of the same type --- this implies that the
index set is renumbered so that it starts at 0 again.
\index{slicing}