mirror of https://github.com/python/cpython
#7721: replace code that works only in 2.7+ with equivalent.
This commit is contained in:
parent
e2a5daa5e3
commit
9bfb628d71
|
@ -1390,8 +1390,8 @@ available. They are listed here in alphabetical order.
|
||||||
restricts all arguments to native C longs ("short" Python integers), and
|
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
|
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
|
larger range is needed, an alternate version can be crafted using the
|
||||||
:mod:`itertools` module: ``islice(count(start, step),
|
:mod:`itertools` module: ``takewhile(lambda x: x<stop, (start+i*step
|
||||||
(stop-start+step-1)//step)``.
|
for i in count()))``.
|
||||||
|
|
||||||
|
|
||||||
.. function:: zip([iterable, ...])
|
.. function:: zip([iterable, ...])
|
||||||
|
|
Loading…
Reference in New Issue