Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-39094: Add a default to statistics.mean and related functions #17657

Open
wants to merge 1 commit into
base: master
from

Conversation

@yoniLavi
Copy link
Contributor

yoniLavi commented Dec 19, 2019

bpo-39094: Add a default to statistics.mean and related functions

This pull request provides an example python-based implementation of a default parameter to the mean, fmean, geometric_mean and harmonic_mean functions in the statistics module.

https://bugs.python.org/issue39094

@yoniLavi yoniLavi changed the title Add a default kw-only argument to mean functions bpo-39094: Add a default to statistics.mean and related functions Dec 19, 2019
Copy link
Contributor

taleinat left a comment

Using None for the default should certainly be supported. This needs to use a different mechanism to detect whether a default value was provided. For example, a custom sentinel value, e.g. _NO_DEFAULT = object(), would do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.