python / cpython

The Python programming language
https://www.python.org
Other
63.15k stars 30.24k forks source link

statistics: incorrect documentation #82566

Closed dbef62b9-748b-467c-814d-4382f38a6075 closed 4 years ago

dbef62b9-748b-467c-814d-4382f38a6075 commented 5 years ago
BPO 38385
Nosy @rhettinger, @lebigot, @stevendaprano
PRs
  • python/cpython#17111
  • python/cpython#17113
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields: ```python assignee = 'https://github.com/rhettinger' closed_at = created_at = labels = ['3.7', '3.8', '3.9', 'docs'] title = 'statistics: incorrect documentation' updated_at = user = 'https://github.com/lebigot' ``` bugs.python.org fields: ```python activity = actor = 'rhettinger' assignee = 'rhettinger' closed = True closed_date = closer = 'rhettinger' components = ['Documentation'] creation = creator = 'lebigot' dependencies = [] files = [] hgrepos = [] issue_num = 38385 keywords = ['patch'] message_count = 4.0 messages = ['354043', '354044', '356421', '356425'] nosy_count = 4.0 nosy_names = ['rhettinger', 'lebigot', 'steven.daprano', 'docs@python'] pr_nums = ['17111', '17113'] priority = 'low' resolution = 'fixed' stage = 'resolved' status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue38385' versions = ['Python 3.5', 'Python 3.6', 'Python 3.7', 'Python 3.8', 'Python 3.9'] ```

    dbef62b9-748b-467c-814d-4382f38a6075 commented 5 years ago

    The documentation for the statistics package indicates that many of its functions (like median()) accept iterators. They seem to actually accept something more convenient, namely iterables.

    Thus, iterator could probably be usefully replaced by iterable on many of the functions (when applicable, which I would expect is everywhere).

    rhettinger commented 5 years ago

    This is a reasonable suggestion (all iterators are iterable, but not all iterables are iterators). I'll work on it shortly (in conjunction with some other minor doc fixups).

    rhettinger commented 4 years ago

    New changeset 733b9a308e3c49855888e2e12397ae56d831e780 by Raymond Hettinger in branch 'master': bpo-38385: Fix iterator/iterable terminology in statistics docs (GH-17111) https://github.com/python/cpython/commit/733b9a308e3c49855888e2e12397ae56d831e780

    rhettinger commented 4 years ago

    New changeset 3562439eb293c5fe90b1f1fe507d57d2f4fcd044 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-38385: Fix iterator/iterable terminology in statistics docs (GH-17111) (GH-17113) https://github.com/python/cpython/commit/3562439eb293c5fe90b1f1fe507d57d2f4fcd044