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

Created on 2017-08-09 07:42 by serhiy.storchaka, last changed 2017-08-09 19:17 by rhettinger.

Pull Requests
URL Status Linked Edit
PR 3047 open Nickk, 2017-08-09 18:39
Messages (1)
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.
History
Date User Action Args
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