From: Georg Brandl Date: Mon, 5 Apr 2010 11:46:16 +0000 (+0000) Subject: #7721: replace code that works only in 2.7+ with equivalent. X-Git-Tag: v2.6.6rc1~484 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9bfb628d71bccebf5701a003de5d57a2091fbb49;p=python #7721: replace code that works only in 2.7+ with equivalent. --- diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 26aa745a52..b7646629d1 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1390,8 +1390,8 @@ available. They are listed here in alphabetical order. restricts all arguments to native C longs ("short" Python integers), and 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)``. + :mod:`itertools` module: ``takewhile(lambda x: x