[docs] [issue31153] Update docstrings of itertools function

Serhiy Storchaka report at bugs.python.org
Wed Aug 9 03:42:39 EDT 2017

New submission from Serhiy Storchaka:

Docstrings of some itertools functions look outdated.

1. The docstring of groupby() contains the signature "groupby(iterable[, keyfunc])". But groupby() supports keyword arguments, the name of the second parameter is "key", and its default value is None.

2. accumulate() accepts None as the second argument.

3. The equivalent code of count() has the first parameter "firstval" instead of "start". It uses the "while 1" loop instead of more idiomatic in Python 3 "while True".

4. The term "sequence" is used in the docstring of starmap(), while actually an iterable is accepted. Compare with the docstring of map(). See also issue31082.

assignee: docs at python
components: Documentation
keywords: easy
messages: 299975
nosy: docs at python, rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Update docstrings of itertools function
type: enhancement
versions: Python 3.6, Python 3.7

Python tracker <report at bugs.python.org>

More information about the docs mailing list