[issue39094] Add a default to statistics.mean and related functions
Yoni Lavi
report at bugs.python.org
Wed Dec 18 22:06:41 EST 2019
New submission from Yoni Lavi <yoni at lavi.fm>:
I would like to put forward an argument in favour of a `default` parameter in the statistics.mean function and the related function.
What motivated me to open this is that my code would more often than not include a check (or try-except) whenever I calculate a mean and add a default/sentinel value, and I felt that there should be a better way.
Please also note that we have a precedent for this in a similar parameter added to min & max in 3.4 (https://bugs.python.org/issue18111)
----------
components: Library (Lib)
messages: 358653
nosy: Yoni Lavi
priority: normal
severity: normal
status: open
title: Add a default to statistics.mean and related functions
type: enhancement
versions: Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39094>
_______________________________________
More information about the Python-bugs-list
mailing list