Update docs w.r.t. PEP 3100 changes -- patch for GHOP by Dan Finnie.
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
index 58ed4fa..013ed38 100644
--- a/Doc/library/itertools.rst
+++ b/Doc/library/itertools.rst
@@ -177,7 +177,8 @@
Make an iterator that filters elements from iterable returning only those for
which the predicate is ``True``. If *predicate* is ``None``, return the items
- that are true. Equivalent to::
+ that are true. This function is the same as the built-in :func:`filter`
+ function. Equivalent to::
def ifilter(predicate, iterable):
if predicate is None:
@@ -204,7 +205,8 @@
.. function:: imap(function, *iterables)
Make an iterator that computes the function using arguments from each of the
- iterables. Equivalent to::
+ iterables. This function is the same as the built-in :func:`map` function.
+ Equivalent to::
def imap(function, *iterables):
iterables = [iter(it) for it in iterables)
@@ -230,7 +232,7 @@
def islice(iterable, *args):
s = slice(*args)
- it = iter(range(s.start or 0, s.stop or sys.maxsize, s.step or 1))
+ it = range(s.start or 0, s.stop or sys.maxsize, s.step or 1)
nexti = next(it)
for i, element in enumerate(iterable):
if i == nexti: