< abs(b)``.
-.. function:: enumerate(sequence[, start=0])
+.. function:: enumerate(iterable[, start=0])
- Return an enumerate object. *sequence* must be a sequence, an
+ Return an enumerate object. *iterable* must be a sequence, an
:term:`iterator`, or some other object which supports iteration. The
:meth:`__next__` method of the iterator returned by :func:`enumerate` returns a
tuple containing a count (from *start* which defaults to 0) and the
enumobject *en;
PyObject *seq = NULL;
PyObject *start = NULL;
- static char *kwlist[] = {"sequence", "start", 0};
+ static char *kwlist[] = {"iterable", "start", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O:enumerate", kwlist,
&seq, &start))
}
PyDoc_STRVAR(filter_doc,
-"filter(function or None, sequence) --> filter object\n\
+"filter(function or None, iterable) --> filter object\n\
\n\
-Return an iterator yielding those items of sequence for which function(item)\n\
+Return an iterator yielding those items of iterable for which function(item)\n\
is true. If function is None, return the items that are true.");
PyTypeObject PyFilter_Type = {
}
PyDoc_STRVAR(iter_doc,
-"iter(collection) -> iterator\n\
+"iter(iterable) -> iterator\n\
iter(callable, sentinel) -> iterator\n\
\n\
Get an iterator from an object. In the first form, the argument must\n\
}
PyDoc_STRVAR(sum_doc,
-"sum(sequence[, start]) -> value\n\
+"sum(iterable[, start]) -> value\n\
\n\
-Returns the sum of a sequence of numbers (NOT strings) plus the value\n\
-of parameter 'start' (which defaults to 0). When the sequence is\n\
+Returns the sum of an iterable of numbers (NOT strings) plus the value\n\
+of parameter 'start' (which defaults to 0). When the iterable is\n\
empty, returns start.");