[New-bugs-announce] [issue39094] Add a default to statistics.mean and related functions
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)
nosy: Yoni Lavi
title: Add a default to statistics.mean and related functions
versions: Python 3.9
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce