summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2019-03-12 07:43:27 (GMT)
committerGitHub <noreply@github.com>2019-03-12 07:43:27 (GMT)
commitfc06a192fdc44225ef1cc879f615a81931ad0a85 (patch)
tree3a6eb28aac5ebf320cb665fa53a9a08cf75fbcc0 /Doc/whatsnew
parent3e936431e23b424b1e4665e8165c245924f0ab02 (diff)
downloadcpython-fc06a192fdc44225ef1cc879f615a81931ad0a85.zip
cpython-fc06a192fdc44225ef1cc879f615a81931ad0a85.tar.gz
cpython-fc06a192fdc44225ef1cc879f615a81931ad0a85.tar.bz2
bpo-35892: Fix mode() and add multimode() (#12089)
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.8.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst
index 9cd5a3a..ad86917 100644
--- a/Doc/whatsnew/3.8.rst
+++ b/Doc/whatsnew/3.8.rst
@@ -282,6 +282,9 @@ Added :func:`statistics.fmean` as a faster, floating point variant of
:func:`statistics.mean()`. (Contributed by Raymond Hettinger and
Steven D'Aprano in :issue:`35904`.)
+Added :func:`statistics.multimode` that returns a list of the most
+common values. (Contributed by Raymond Hettinger in :issue:`35892`.)
+
Added :class:`statistics.NormalDist`, a tool for creating
and manipulating normal distributions of a random variable.
(Contributed by Raymond Hettinger in :issue:`36018`.)
@@ -591,6 +594,11 @@ Changes in the Python API
* The function :func:`platform.popen` has been removed, it was deprecated since
Python 3.3: use :func:`os.popen` instead.
+* The :func:`statistics.mode` function no longer raises an exception
+ when given multimodal data. Instead, it returns the first mode
+ encountered in the input data. (Contributed by Raymond Hettinger
+ in :issue:`35892`.)
+
* The :meth:`~tkinter.ttk.Treeview.selection` method of the
:class:`tkinter.ttk.Treeview` class no longer takes arguments. Using it with
arguments for changing the selection was deprecated in Python 3.6. Use