Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #111221

Re: Quick poll: gmean or geometric_mean

From Stefan Behnel <stefan_ml@behnel.de>
Newsgroups comp.lang.python
Subject Re: Quick poll: gmean or geometric_mean
Date 2016-07-09 12:23 +0200
Message-ID <mailman.149.1468059817.2295.python-list@python.org> (permalink)
References <57808af6$0$1602$c3e8da3$5496439d@news.astraweb.com> <1468043386.1292856.661217857.45C882AD@webmail.messagingengine.com> <57809936.6020303@stoneleaf.us> <nlqjb2$uj8$1@ger.gmane.org>

Show all headers | View raw


Ethan Furman schrieb am 09.07.2016 um 08:27:
> On 07/08/2016 10:49 PM, Random832 wrote:
>> On Sat, Jul 9, 2016, at 01:26, Steven D'Aprano wrote:
> 
>>> hmean and gmean
>>>
>>> harmonic_mean and geometric_mean
>>
>> The latter, definitely.
> 
> My preference is also for the latter.  However, if the rest of the module
> is filled with abbreviated names you may as well be consistent with them.

+1 for consistency, but I'm just fine with the short names. It's in the
statistics module after all, so the context is very narrow and clear and
people who don't know which to use or what the one does that they find in a
given piece of code will have to read the docs and maybe fresh up their
rusty math memory anyway. Longer names don't help much with that.

If further clarity is needed in a given code context that uses a direct
name import, renaming the function at the same time is easy enough. I often
do that with "os.path.join", for example, which turns into "join_path" on
import. Same problem, easy solution.

Stefan

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Quick poll: gmean or geometric_mean Steven D'Aprano <steve@pearwood.info> - 2016-07-09 15:26 +1000
  Re: Quick poll: gmean or geometric_mean Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-07-09 08:43 +0300
  Re: Quick poll: gmean or geometric_mean Random832 <random832@fastmail.com> - 2016-07-09 01:49 -0400
  Re: Quick poll: gmean or geometric_mean Ethan Furman <ethan@stoneleaf.us> - 2016-07-08 23:27 -0700
  Re: Quick poll: gmean or geometric_mean Peter Otten <__peter__@web.de> - 2016-07-09 11:04 +0200
    Re: Quick poll: gmean or geometric_mean Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-07-12 15:13 -0700
      Re: Quick poll: gmean or geometric_mean Chris Angelico <rosuav@gmail.com> - 2016-07-13 08:17 +1000
  Re: Quick poll: gmean or geometric_mean Stefan Behnel <stefan_ml@behnel.de> - 2016-07-09 12:23 +0200
  Re: Quick poll: gmean or geometric_mean Ethan Furman <ethan@stoneleaf.us> - 2016-07-09 06:51 -0700
  Re: Quick poll: gmean or geometric_mean Jason Friedman <jsf80238@gmail.com> - 2016-07-09 08:16 -0600
  Re: Quick poll: gmean or geometric_mean Michael Selik <michael.selik@gmail.com> - 2016-07-09 16:13 +0000
  Re: Quick poll: gmean or geometric_mean Robert Kern <robert.kern@gmail.com> - 2016-07-09 17:53 +0100
  Re: Quick poll: gmean or geometric_mean Michael Selik <michael.selik@gmail.com> - 2016-07-09 18:31 +0000
  Re: Quick poll: gmean or geometric_mean Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-07-09 17:39 -0400
  Re: Quick poll: gmean or geometric_mean Chris Angelico <rosuav@gmail.com> - 2016-07-10 07:45 +1000
  Re: Quick poll: gmean or geometric_mean Rustom Mody <rustompmody@gmail.com> - 2016-07-10 00:28 -0700
    Re: Quick poll: gmean or geometric_mean Steven D'Aprano <steve@pearwood.info> - 2016-07-10 18:51 +1000
      Re: Quick poll: gmean or geometric_mean Michael Selik <michael.selik@gmail.com> - 2016-07-10 09:24 +0000
        Re: Quick poll: gmean or geometric_mean Steven D'Aprano <steve@pearwood.info> - 2016-07-10 20:08 +1000
          Re: Quick poll: gmean or geometric_mean Chris Angelico <rosuav@gmail.com> - 2016-07-10 21:07 +1000
          Re: Quick poll: gmean or geometric_mean Rustom Mody <rustompmody@gmail.com> - 2016-07-10 07:29 -0700
            Re: Quick poll: gmean or geometric_mean Rustom Mody <rustompmody@gmail.com> - 2016-07-10 07:44 -0700
            Re: Quick poll: gmean or geometric_mean Ian Kelly <ian.g.kelly@gmail.com> - 2016-07-10 08:55 -0600
              Re: Quick poll: gmean or geometric_mean Marko Rauhamaa <marko@pacujo.net> - 2016-07-10 18:03 +0300
                Re: Quick poll: gmean or geometric_mean Ian Kelly <ian.g.kelly@gmail.com> - 2016-07-10 11:15 -0600
                Re: Quick poll: gmean or geometric_mean Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-07-12 15:17 -0700
                Re: Quick poll: gmean or geometric_mean alister <alister.ware@ntlworld.com> - 2016-07-12 22:57 +0000
                Re: Quick poll: gmean or geometric_mean Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-07-12 18:42 -0700
                Re: Quick poll: gmean or geometric_mean Gene Heskett <gheskett@shentel.net> - 2016-07-12 21:58 -0400
                Re: Quick poll: gmean or geometric_mean alister <alister.ware@ntlworld.com> - 2016-07-13 13:03 +0000
                Re: Quick poll: gmean or geometric_mean Steven D'Aprano <steve@pearwood.info> - 2016-07-13 12:25 +1000
                Re: Quick poll: gmean or geometric_mean Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-07-10 19:21 -0400
            Re: Quick poll: gmean or geometric_mean Random832 <random832@fastmail.com> - 2016-07-10 12:08 -0400
            Re: Quick poll: gmean or geometric_mean Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-07-12 15:19 -0700
          Re: Quick poll: gmean or geometric_mean Michael Selik <michael.selik@gmail.com> - 2016-07-10 15:43 +0000
  Re: Quick poll: gmean or geometric_mean Ian Kelly <ian.g.kelly@gmail.com> - 2016-07-10 01:28 -0600
    Re: Quick poll: gmean or geometric_mean Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-07-10 11:01 +0300
      Re: Quick poll: gmean or geometric_mean Ian Kelly <ian.g.kelly@gmail.com> - 2016-07-10 09:04 -0600

csiph-web