Skip to content

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

Closed
yoniLavi wants to merge 1 commit into
python:masterfrom
yoniLavi:mean
Closed

yoniLavi wants to merge 1 commit into
python:masterfrom
yoniLavi:mean

Conversation

@yoniLavi

@yoniLavi yoniLavi commented Dec 19, 2019 •

Copy link
Copy Markdown
Contributor

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

@taleinat taleinat left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@csabella

Copy link
Copy Markdown
Contributor

Thank you for your work on this, but I'm going to close this PR as the issue on the bug tracker was rejected.

@csabella csabella closed this May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants