Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Ian Kelly Newsgroups: comp.lang.python Subject: Re: Quick poll: gmean or geometric_mean Date: Sun, 10 Jul 2016 08:55:28 -0600 Lines: 29 Message-ID: References: <57808af6$0$1602$c3e8da3$5496439d@news.astraweb.com> <57820c7a$0$1617$c3e8da3$5496439d@news.astraweb.com> <57821eaa$0$1584$c3e8da3$5496439d@news.astraweb.com> <1014e463-20b0-446f-96f6-c142587f4b82@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de O+/ZRy1JZt1TWi1IeaLTng7xBPtRTipu0mtG/Aim/QnQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.059 X-Spam-Evidence: '*H*': 0.88; '*S*': 0.00; 'cc:addr:python-list': 0.09; 'python': 0.10; '"g"': 0.16; '2016': 0.16; 'anyone?': 0.16; 'cc:name:python': 0.16; 'contexts,': 0.16; 'naming': 0.16; 'received:io': 0.16; 'received:mail-oi0-x22a.google.com': 0.16; 'received:psf.io': 0.16; 'verbose': 0.16; 'wrote:': 0.16; 'skip:u 30': 0.18; 'typical': 0.18; 'math': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'form:': 0.22; 'am,': 0.23; 'defined': 0.23; 'bit': 0.23; 'header:In-Reply-To:1': 0.24; 'message- id:@mail.gmail.com': 0.27; 'fine': 0.28; 'skip:( 50': 0.29; 'url:wikipedia': 0.29; "i'm": 0.30; 'url:wiki': 0.30; 'code': 0.30; 'skip:- 10': 0.34; 'skip:d 20': 0.34; 'received:google.com': 0.35; 'skip:( 30': 0.35; 'clear': 0.35; 'necessary.': 0.35; 'but': 0.36; 'should': 0.36; 'url:org': 0.36; 'subject:: ': 0.37; 'names': 0.38; 'url:en': 0.39; 'still': 0.40; 'more': 0.63; 'times': 0.63; 'physics': 0.66; '8bit%:57': 0.72; 'jul': 0.72; 'square': 0.76; 'cobol': 0.84; 'presumably': 0.84; 'standards.': 0.84; 'subject:Quick': 0.84; 'to:none': 0.91; 'excessive': 0.91; 'subject:skip:g 10': 0.91; 'divided': 0.93 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:cc :content-transfer-encoding; bh=HU/4OTkFkVL0gb7AMPy3Lqzi5pXK3j2szOxeoB4Uctc=; b=MGMQoUwQ7mY/UuE+k0Z/NpxHRuLYbOVDsrVvedK27r0ZWIVJSAtsxbJ0zy4RzrDfc+ 38A4RC6lldFZsXB1X8psCj7d+lRJaaWA4egCHrbTXaLEaPWvot8oyOv63ORGJbqPEk60 F8X4WcddjB6qPonQeMZvh8kLGI+cW3Sz5dfZRACP+j90dWAI4GY16y5bM3NXobejq+Oy DF+VQaWAnzHLYFmfFIxaXQ+sjFXX1ShXokOiglxTwRYxr6GbtOdgtX3Q+wXPST5Y6i00 UJV0XKV3sJYzPjVIsCqE+aLkR1m0afQWDO/RWFAC9obUmbV8oHEcZBh7Xrq1dk8NejKR oDdQ== 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:cc:content-transfer-encoding; bh=HU/4OTkFkVL0gb7AMPy3Lqzi5pXK3j2szOxeoB4Uctc=; b=Xpjpq5to2Y0o/lP4TTaL7sWBfcVkr02Qjee9dzAE5M+GnJHxlP0vts5lYjsrRPAGLW WOpSRPj46tX/7USYOOykRMieGL7Tp8BoxX2JMfdxT35gNPTgpe1aNQZH/7UDvz78H5uQ VSL/hA3dlKx2Vb5tpmjHzCqjdmv8WbijF3uRoFB7VKcBhxB6FpMQSvgTSxamCvvl+vLY wWwCSfYZ/q1Cg5FUoT4sdY0sgtNyB0jQ/MWwc7C0s/2zTbNAg9Cfo/GvKX1IEWl0AvAk gz3ah0wRyGSYjN44FPNYfx1OPcxqyS+oSHeS9zbzQToZe8g9SyZRc8xrHDiLjNwQXQaA dtVA== X-Gm-Message-State: ALyK8tIdnxO0Wx5jUHi0Cn47ORl/pt5RNtO2b728fMCkkCqNQNWelergd87b73enLI89GsQUJx6TxtKQUkeMBA== X-Received: by 10.202.231.83 with SMTP id e80mr7484172oih.159.1468162567464; Sun, 10 Jul 2016 07:56:07 -0700 (PDT) In-Reply-To: <1014e463-20b0-446f-96f6-c142587f4b82@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <57808af6$0$1602$c3e8da3$5496439d@news.astraweb.com> <57820c7a$0$1617$c3e8da3$5496439d@news.astraweb.com> <57821eaa$0$1584$c3e8da3$5496439d@news.astraweb.com> <1014e463-20b0-446f-96f6-c142587f4b82@googlegroups.com> Xref: csiph.com comp.lang.python:111247 On Sun, Jul 10, 2016 at 8:29 AM, Rustom Mody wrote: > Newton's law F =3D -Gm=E2=82=81m=E2=82=82/r=C2=B2 > > Better seen in its normal math form: > https://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation#Mod= ern_form > > De-abbreviated > > Force is given by the negative of the universal_gravitational_constant ti= mes > the mass_of_first_body times mass_of_second_body divided by the square of= the distance_between_the_bodies > > Cobol anyone? > > Ok with typical python naming > > Force =3D (universal_gravitational_constant * mass_of_first_body * mass_o= f_second_body) / (distance_between_the_bodies*distance_between_the_bodies) That's still excessive by any reasonable standards. Names should be descriptive, but no more verbose than necessary. How about: force_N =3D -G * mass1_kg * mass2_kg / distance_m ** 2 I'm fine with "G" as is because it's the standard name for the value in physics contexts, and it's presumably defined in the code as a constant. It's every bit as clear as "pi".