This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Update docstrings of itertools functions
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.7, Python 3.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: docs@python, rhettinger, serhiy.storchaka, vexoxev
Priority: normal Keywords: easy

Created on 2017-08-09 07:42 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 3047 closed Nickk, 2017-08-09 18:39
Messages (3)
msg299975 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-08-09 07:42
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.
msg302719 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-09-21 20:08
For groupby() see also issue27385.
msg302893 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2017-09-24 23:03
Marking this as closed.  1) is being fixed elsewhere, 2) don't want to make func=None an official part of the API (it was a convenience for letting func default to the equivalent of operator.add), 3) already fixed, and 4) already fixed.
Date User Action Args
2022-04-11 14:58:49adminsetgithub: 75336
2017-09-24 23:03:04rhettingersetstatus: open -> closed
resolution: fixed
messages: + msg302893

stage: resolved
2017-09-21 20:08:59serhiy.storchakasetmessages: + msg302719
2017-08-27 11:29:34vexoxevsetnosy: + vexoxev
2017-08-09 19:17:10rhettingersetassignee: docs@python -> rhettinger
2017-08-09 18:39:08Nickksetpull_requests: + pull_request3081
2017-08-09 07:50:38serhiy.storchakasettitle: Update docstrings of itertools function -> Update docstrings of itertools functions
2017-08-09 07:42:39serhiy.storchakacreate