diff options
author | Eli Bendersky <eliben@gmail.com> | 2011-05-23 03:10:26 (GMT) |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2011-05-23 03:10:26 (GMT) |
commit | 29f6efa844950fa50cb58a0fe6ace584954df157 (patch) | |
tree | f0a8393839d68a5aed68067e38f0da63ff8721e5 /Doc | |
parent | 0406d966a13f55002583244f41b8dc8fbdd2ed9e (diff) | |
download | cpython-29f6efa844950fa50cb58a0fe6ace584954df157.zip cpython-29f6efa844950fa50cb58a0fe6ace584954df157.tar.gz cpython-29f6efa844950fa50cb58a0fe6ace584954df157.tar.bz2 |
Issue 12003: fixing error in xrange alternative sample
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/functions.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 4b63c9f..962a53d 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1464,7 +1464,7 @@ available. They are listed here in alphabetical order. also requires that the number of elements fit in a native C long. If a larger range is needed, an alternate version can be crafted using the :mod:`itertools` module: ``islice(count(start, step), - (stop-start+step-1)//step)``. + (stop-start+step-1+2*(step<0))//step)``. .. function:: zip([iterable, ...]) |