]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#8635: document enumerate() start parameter in docstring.
authorGeorg Brandl <georg@python.org>
Sat, 22 May 2010 11:43:25 +0000 (11:43 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 22 May 2010 11:43:25 +0000 (11:43 +0000)
Objects/enumobject.c

index a83fc7c4615e99be91b4e3718fbf569fb1fe5f07..1ef381f391428cb60feb5f6ef3507272d4021656 100644 (file)
@@ -159,12 +159,13 @@ enum_next(enumobject *en)
 }
 
 PyDoc_STRVAR(enum_doc,
-"enumerate(iterable) -> iterator for index, value of iterable\n"
+"enumerate(iterable[, start]) -> iterator for index, value of iterable\n"
 "\n"
 "Return an enumerate object.  iterable must be another object that supports\n"
 "iteration.  The enumerate object yields pairs containing a count (from\n"
-"zero) and a value yielded by the iterable argument.  enumerate is useful\n"
-"for obtaining an indexed list: (0, seq[0]), (1, seq[1]), (2, seq[2]), ...");
+"start, which defaults to zero) and a value yielded by the iterable argument.\n"
+"enumerate is useful for obtaining an indexed list:\n"
+"    (0, seq[0]), (1, seq[1]), (2, seq[2]), ...");
 
 PyTypeObject PyEnum_Type = {
     PyVarObject_HEAD_INIT(&PyType_Type, 0)