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


Groups > comp.lang.python > #111254

Re: Quick poll: gmean or geometric_mean

Path csiph.com!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!uni-berlin.de!not-for-mail
From Ian Kelly <ian.g.kelly@gmail.com>
Newsgroups comp.lang.python
Subject Re: Quick poll: gmean or geometric_mean
Date Sun, 10 Jul 2016 11:15:59 -0600
Lines 20
Message-ID <mailman.171.1468171001.2295.python-list@python.org> (permalink)
References <57808af6$0$1602$c3e8da3$5496439d@news.astraweb.com> <bc4c3c65-97ba-4c73-86d8-a013ff76f030@googlegroups.com> <57820c7a$0$1617$c3e8da3$5496439d@news.astraweb.com> <CAGgTfkM_ts1ghL=JtmV5Pa85T_8MTveL1vm5d2jg9Kv+SiYE+g@mail.gmail.com> <mailman.163.1468142670.2295.python-list@python.org> <57821eaa$0$1584$c3e8da3$5496439d@news.astraweb.com> <1014e463-20b0-446f-96f6-c142587f4b82@googlegroups.com> <CALwzidkzMuvsK+CQQ98xgwPYSAotRwcyL3CM_ckqWoWaGwwKpQ@mail.gmail.com> <mailman.165.1468162571.2295.python-list@python.org> <87r3b11qnq.fsf@elektro.pacujo.net> <CALwzidkYeECy=hwfZEOrc1nbQ5WFL4o835VUPOqfaggqwnmqog@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de yRFsFDbvS+1ZR6b4mzg7vAdXXrFqL2SkUtj3l58+2xjA==
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.129
X-Spam-Level *
X-Spam-Evidence '*H*': 0.75; '*S*': 0.01; 'implies': 0.09; 'units,': 0.09; 'variables': 0.15; '"g"': 0.16; '2016': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'verbose': 0.16; 'wrote:': 0.16; "wouldn't": 0.16; "shouldn't": 0.18; 'names.': 0.22; 'am,': 0.23; 'demonstrate': 0.23; 'header:In-Reply-To:1': 0.24; 'example': 0.26; 'message-id:@mail.gmail.com': 0.27; 'point': 0.33; 'usually': 0.33; 'received:google.com': 0.35; 'necessary.': 0.35; 'but': 0.36; 'should': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'associated': 0.38; 'no,': 0.38; 'names': 0.38; 'why': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'your': 0.60; 'avoid': 0.61; 'more': 0.63; 'strategy': 0.69; 'jul': 0.72; 'descriptive': 0.84; 'standards.': 0.84; 'subject:Quick': 0.84; 'to:name:python': 0.84; 'ymmv.': 0.84; 'excessive': 0.91; 'subject:skip:g 10': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=/MMg5oq2aq47802n6/yedtnbZxzFCDgkmH9cqs+ExD0=; b=KWR/9SJgsmcfRzm9xhk/s/tJ8sj3w/S8w2hlmkYchtCto6IlxUejHRdqSQWGCSpowG LcvCkRZGKhKFFXPjo9h3t5bfWuxgWFUClvBR1stfZhc4pkvW/ajKVLIbrQ3APX1jU375 hwrrB2hnHvKP9q1a+SXOhVMYnHEtVRbOtsWn4QdXxu4kd93oMkvMpl7FJIguIDZig7jT 0Os5MT4SIqDv5ESDRVxLjV8HxNYsF2ExgTV9k68EHmGVrrU1kBBtIke4GibxlS2lSfX6 Goq8P4UaiGCrnFEm0WJZNL7NsTuAVcdh9BDt/vqiwkrV9KGj/mDOswsgyEgyWiZc6659 B//w==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=/MMg5oq2aq47802n6/yedtnbZxzFCDgkmH9cqs+ExD0=; b=SetWevLWSABmnur637zqc6JnFCi65rlbToW5iEbNp/eJ7fBMcZ8gF4P6GageuCn3sX adXAMv+3XIOOhhSaHaCx/u2BrHi++zsB1QqDF/Gq0s0VgSnS22DJPNSM11HMXkr4ROO4 uxE4NBUpW9zwWU+uDiK5RAaHVPjYJREI5T/oy5t8TdbvunFMAbUX2rAcZ99Av7E8yfOc +/C9/9NREKSr93SA0t+z/Ufy7TgtwJAkjMxpqEY2JNSnQ6lSnbS25C9gO8gXi9w65v5G Z7JTrS5/QOHVokgjvXezA48fDBH5+z/hEwwlVmP6TVglqm32brFI0De3lva35oJMJbLa R4rQ==
X-Gm-Message-State ALyK8tKnIU/uTizWSH0wkclBQSdEeO7PTGIzO9G9YOFKbjjHeB2WpJv14nr22+GpnN2C4FTiwbEHz3U/VkBMSw==
X-Received by 10.202.181.137 with SMTP id e131mr8408336oif.144.1468170998837; Sun, 10 Jul 2016 10:16:38 -0700 (PDT)
In-Reply-To <87r3b11qnq.fsf@elektro.pacujo.net>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <CALwzidkYeECy=hwfZEOrc1nbQ5WFL4o835VUPOqfaggqwnmqog@mail.gmail.com>
X-Mailman-Original-References <57808af6$0$1602$c3e8da3$5496439d@news.astraweb.com> <bc4c3c65-97ba-4c73-86d8-a013ff76f030@googlegroups.com> <57820c7a$0$1617$c3e8da3$5496439d@news.astraweb.com> <CAGgTfkM_ts1ghL=JtmV5Pa85T_8MTveL1vm5d2jg9Kv+SiYE+g@mail.gmail.com> <mailman.163.1468142670.2295.python-list@python.org> <57821eaa$0$1584$c3e8da3$5496439d@news.astraweb.com> <1014e463-20b0-446f-96f6-c142587f4b82@googlegroups.com> <CALwzidkzMuvsK+CQQ98xgwPYSAotRwcyL3CM_ckqWoWaGwwKpQ@mail.gmail.com> <mailman.165.1468162571.2295.python-list@python.org> <87r3b11qnq.fsf@elektro.pacujo.net>
Xref csiph.com comp.lang.python:111254

Show key headers only | View raw


On Sun, Jul 10, 2016 at 9:03 AM, Marko Rauhamaa <marko@pacujo.net> wrote:
> Ian Kelly <ian.g.kelly@gmail.com>:
>
>> That's still excessive by any reasonable standards. Names should be
>> descriptive, but no more verbose than necessary. How about:
>>
>> force_N = -G * mass1_kg * mass2_kg / distance_m ** 2
>
> Why bother with tagging the names with standard units?

The point of the example was to demonstrate descriptive names. For
local variables I usually wouldn't bother with the units, but in
general it's a good practice to help avoid crashing your orbiter into
Mars.

> Shouldn't it be G_N_m2_per_kg2, given your strategy for identifying the
> units associated with the other variables?

To me, the use of the standard name implies standard units, so no, "G"
is sufficient. YMMV.

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