Author terry.reedy
Recipients docs@python, ncoghlan, rhettinger, terry.reedy, vreuter
Date 2018-03-30.20:33:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522442008.07.0.467229070634.issue33130@psf.upfronthosting.co.za>
In-reply-to
Content
inspect.signature(functools.reduce) raises, so I presume you mean the header for the reduce entry at
https://docs.python.org/3/library/functools.html#functools.reduce.  The first line of the docstring, functools.reduce.__doc__, also displayed by help(functools.reduce) has an old version of the signature, which disagrees also on the 3rd parameter name. 
doc header: functools.reduce(function, iterable[, initializer])
.__doc__:   reduce(function, sequence[, initial]) -> value

The current PR only touches the body of the doc entry, not what we call the docstring.  It replaces 'sequence' with 'iterable'.

Functools does not have a Python-coded backup for the C-coded reduce, which only accepts arguments by position.  I have not looked at the C code, whose names are not accessible from Python.  The doc and docstring should match, and should use the parameter names we would want to use of args were ever passed by name.  So I think the docstring (in the C code) should be changed to match the doc.

There should really be a '/,' to indicate that args must be passed by position, or do we only use that in ArgClinic signatures (which show up in help output)?
History
Date User Action Args
2018-03-30 20:33:28terry.reedysetrecipients: + terry.reedy, rhettinger, ncoghlan, docs@python, vreuter
2018-03-30 20:33:28terry.reedysetmessageid: <1522442008.07.0.467229070634.issue33130@psf.upfronthosting.co.za>
2018-03-30 20:33:28terry.reedylinkissue33130 messages
2018-03-30 20:33:28terry.reedycreate