Issue 27825: Make the documentation for statistics' data argument clearer. (original) (raw)

Created on 2016-08-21 20:56 by nedbat, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue27825.patch Mariatta,2016-10-06 04:17 review
issue27825v2.patch Mariatta,2016-10-15 04:44 review
Messages (6)
msg273318 - (view) Author: Ned Batchelder (nedbat) * (Python triager) Date: 2016-08-21 20:56
The docs for statistics.mean say, "Return the sample arithmetic mean of data, a sequence or iterator of real-valued numbers." Most of the functions in statistics have a `data` argument, but this function is the only one that says, "a sequence or iterator." The examples all show lists. The page would be better if the introduction mentioned what `data` could be, instead of having to guess that median can take an iterator because mean says that it can.
msg278168 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2016-10-06 04:17
Updated the docs and updated the example codes as well. Please review :)
msg278694 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2016-10-15 04:44
Updated patch based on feedback. Steven, I removed the example of median_grouped using Fractions. Would you be able to suggest better examples to be added in the docs? I also noticed that there are more examples of median_grouped in the paragraph below. Thanks.
msg281414 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-11-22 00:32
New changeset 71dd21a3b9cc by Raymond Hettinger in branch '3.6': Issue #27825: Improve for statistics data arguments. (Contributed by Mariatta Wijaya.) https://hg.python.org/cpython/rev/71dd21a3b9cc
msg281416 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2016-11-22 00:32
Thanks Mariatta. As discussed in chat, I dropped the extra fractions examples because they didn't seem to add value.
msg281418 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2016-11-22 00:33
Sounds good. Thanks, Raymond :)
History
Date User Action Args
2022-04-11 14:58:35 admin set github: 72012
2016-11-22 00:33:51 Mariatta set messages: +
2016-11-22 00:32:58 rhettinger set status: open -> closednosy: + rhettingermessages: + resolution: fixed
2016-11-22 00:32:06 python-dev set nosy: + python-devmessages: +
2016-10-15 04:44:37 Mariatta set files: + issue27825v2.patchmessages: +
2016-10-06 04:17:36 Mariatta set files: + issue27825.patchnosy: + Mariattamessages: + keywords: + patch
2016-08-23 14:37:06 steven.daprano set assignee: docs@python -> steven.dapranonosy: + steven.daprano
2016-08-21 20:56:47 nedbat create