diff options
author | Eli Bendersky <eliben@gmail.com> | 2011-05-23 06:10:26 +0300 |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2011-05-23 06:10:26 +0300 |
commit | 8a9762f029dece5648224936c8e1b44b3b6928e2 (patch) | |
tree | a7a2be8de319040324040f830cfcefb4c866f71b | |
parent | b75bf11c684279c6081ec76cd8fc4219c9a11553 (diff) | |
download | cpython-8a9762f029dece5648224936c8e1b44b3b6928e2.tar.gz |
Issue 12003: fixing error in xrange alternative sample
-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 4b63c9f70e..962a53d45e 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, ...]) |