This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author raoulgough
Recipients
Date 2003-08-21.18:02:53
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Section 2.2.6 (Sequence types), note 5 from the table 
says:

  "The slice of s from i to j with step k is defined as the 
sequence of items with index x = i + n*k such that 0 
<= n < abs(i-j). [...]"

However, n should only range up to (j-i)//k

Note also that (j-i)//k correctly specifies the results for 
negative values of k, and empty sequence returns 
where signof(j-i) != signof (k). Maybe worth mentioning 
that k != 0  (!! :-)
History
Date User Action Args
2007-08-23 14:16:17adminlinkissue792656 messages
2007-08-23 14:16:17admincreate