Quick poll: gmean or geometric_mean

Jussi Piitulainen jussi.piitulainen at helsinki.fi
Sun Jul 10 04:01:22 EDT 2016


Ian Kelly <ian.g.kelly at gmail.com> writes:

> On Sat, Jul 9, 2016 at 3:45 PM, Chris Angelico <rosuav at gmail.com> wrote:
>> On Sat, Jul 9, 2016 at 3:26 PM, Steven D'Aprano <steve at pearwood.info> wrote:
>>> I'd like to get a quick show of hands regarding the names. Which do you
>>> prefer?
>>>
>>> hmean and gmean
>>>
>>> harmonic_mean and geometric_mean
>>
>> I'd prefer the shorter names.
>
> I'd prefer the longer. Anybody who wants gmean can easily type:
>
>     from statistics import geometric_mean as gmean

That argument goes both ways with equal force. Possibly very slightly in
favour of the *shorter* names, for those who are happy to import the
function with its eventual name as is.

I did say "very slightly".



More information about the Python-list mailing list