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


Groups > comp.lang.python > #69476

Re: Code style query: multiple assignments in if/elif tree

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
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.049
X-Spam-Evidence '*H*': 0.90; '*S*': 0.00; 'subject:query': 0.07; 'here?': 0.09; 'assume': 0.14; 'equations': 0.16; 'itself,': 0.16; 'relevant.': 0.16; 'all.': 0.16; 'wrote:': 0.18; 'subject:Code': 0.24; 'initial': 0.24; 'train': 0.26; 'subject:/': 0.26; 'header :In-Reply-To:1': 0.27; 'am,': 0.29; 'needed.': 0.30; 'message- id:@mail.gmail.com': 0.30; 'assumes': 0.31; '(2)': 0.35; 'case,': 0.35; 'received:google.com': 0.35; '(3)': 0.38; 'to:addr:python- list': 0.38; 'environment.': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'simply': 0.61; 'skip:n 10': 0.64; 'between': 0.67; 'heh.': 0.84; 'traveling': 0.96
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 :content-type; bh=5hEZQhSqkUXIKfFObaVafLEnz/9eHSDQCbyI/q3fJuw=; b=VXMz1jVL7T4zswswI3SqD17slArgZxnljkwpLT8WW7Y5mdSFsXVQfLr7mkDL26yH+3 Pn+06S1AE9KLKWr/MG+HzM/GM1md0f0dRWkq8D1gfp4BHUQkrDAPNP9ekaYHHKgZU1SK g5YlKAaB/E1I1790msMdh7jKmT1SWSGkW8tD8o8F+YAlXON3FawptAfXlKKlWhxvmHnE 7Ol11+FExPhYS77NljGNj12+mo8//8J+OdX/rY4e/58Rht0QDxxtzYobYhIeLUN2M0I2 CiwNQyRqqYNSkjJ2VuWJIGm4GBnkJWBK66vQGqRrydeD4rNTD5qVl5ae6bwydA0pyzgj NDSA==
X-Received by 10.68.190.200 with SMTP id gs8mr10960330pbc.130.1396334427627; Mon, 31 Mar 2014 23:40:27 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <CA+vVgJUW8hugy-9Dt16unYdPw8zw4_F7=rtpQb5SmmLbUORafw@mail.gmail.com>
References <mailman.8744.1396276875.18130.python-list@python.org> <533a3fd8$0$2909$c3e8da3$76491128@news.astraweb.com> <CAPTjJmoqdHtbyTKLf0b6c5Xy8Wx_NQVvFenB-S0hE3dHO15uzA@mail.gmail.com> <CALwzidmEqc45K49c3agMzRzpAtEqejGF2svpPOZXg5X6dbBnGw@mail.gmail.com> <CA+vVgJUW8hugy-9Dt16unYdPw8zw4_F7=rtpQb5SmmLbUORafw@mail.gmail.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Tue, 1 Apr 2014 00:39:47 -0600
Subject Re: Code style query: multiple assignments in if/elif tree
To Python <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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>
Newsgroups comp.lang.python
Message-ID <mailman.8773.1396334431.18130.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1396334431 news.xs4all.nl 2884 [2001:888:2000:d::a6]:46713
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:69476

Show key headers only | View raw


On Tue, Apr 1, 2014 at 12:24 AM, David Hutto <dwightdhutto@gmail.com> wrote:
>>
>> >> (1) v = u + at
>> >> (2) s = 1/2(u + v)t
>> >> (3) s = ut + 1/2(at^2)
>> >> (4) v^2 = u^2 + 2as
>> >>
>> >> Only (1) and (3) are needed.
>> >
>> > Okay, what's u here? Heh.
>>
>> u is the initial velocity; v is the velocity after accelerating at a for
>> time t.
>
>
> This assumes that the viscosity is in a state of superfluidity, and in a
> perfect state between itself, and it's traveling environment.

I fail to see how this is relevant.  I would assume that the amount of
friction is already modeled in the acceleration constants; if it were
zero then the brakes would be nonfunctional and the train would not be
able to accelerate or decelerate at all.  In any case, a change in
friction simply works out to a change in acceleration.  The equations
above still hold true.

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


Thread

Code style query: multiple assignments in if/elif tree Chris Angelico <rosuav@gmail.com> - 2014-04-01 01:33 +1100
  Re: Code style query: multiple assignments in if/elif tree Marko Rauhamaa <marko@pacujo.net> - 2014-03-31 18:40 +0300
    Re: Code style query: multiple assignments in if/elif tree Chris Angelico <rosuav@gmail.com> - 2014-04-01 03:03 +1100
      Re: Code style query: multiple assignments in if/elif tree Rustom Mody <rustompmody@gmail.com> - 2014-03-31 09:20 -0700
        Re: Code style query: multiple assignments in if/elif tree Chris Angelico <rosuav@gmail.com> - 2014-04-01 03:29 +1100
          Re: Code style query: multiple assignments in if/elif tree "Rhodri James" <rhodri@wildebst.org.uk> - 2014-03-31 21:31 +0100
    Re: Code style query: multiple assignments in if/elif tree Ned Batchelder <ned@nedbatchelder.com> - 2014-03-31 17:42 -0400
    Re: Code style query: multiple assignments in if/elif tree Chris Angelico <rosuav@gmail.com> - 2014-04-01 09:50 +1100
    Re: Code style query: multiple assignments in if/elif tree Ben Finney <ben+python@benfinney.id.au> - 2014-04-01 09:57 +1100
    Re: Code style query: multiple assignments in if/elif tree Chris Angelico <rosuav@gmail.com> - 2014-04-01 10:12 +1100
      Re: Code style query: multiple assignments in if/elif tree Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-01 00:57 +0000
    Re: Code style query: multiple assignments in if/elif tree Ethan Furman <ethan@stoneleaf.us> - 2014-03-31 17:30 -0700
  Re: Code style query: multiple assignments in if/elif tree Steven D'Aprano <steve@pearwood.info> - 2014-04-01 04:26 +0000
    Re: Code style query: multiple assignments in if/elif tree Chris Angelico <rosuav@gmail.com> - 2014-04-01 16:01 +1100
      Re: Code style query: multiple assignments in if/elif tree Steven D'Aprano <steve@pearwood.info> - 2014-04-01 07:20 +0000
        Re: Code style query: multiple assignments in if/elif tree Chris Angelico <rosuav@gmail.com> - 2014-04-01 18:35 +1100
          Re: Code style query: multiple assignments in if/elif tree Steven D'Aprano <steve@pearwood.info> - 2014-04-01 08:07 +0000
            Re: Code style query: multiple assignments in if/elif tree Chris Angelico <rosuav@gmail.com> - 2014-04-01 19:12 +1100
        Re: Code style query: multiple assignments in if/elif tree Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-01 02:18 -0600
        Re: Code style query: multiple assignments in if/elif tree Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-01 02:24 -0600
    Re: Code style query: multiple assignments in if/elif tree Rustom Mody <rustompmody@gmail.com> - 2014-03-31 22:45 -0700
      Re: Code style query: multiple assignments in if/elif tree David Hutto <dwightdhutto@gmail.com> - 2014-04-01 02:05 -0400
      Re: Code style query: multiple assignments in if/elif tree Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-01 00:28 -0600
    Re: Code style query: multiple assignments in if/elif tree Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-01 00:13 -0600
    Re: Code style query: multiple assignments in if/elif tree David Hutto <dwightdhutto@gmail.com> - 2014-04-01 02:24 -0400
    Re: Code style query: multiple assignments in if/elif tree Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-01 00:39 -0600
    Re: Code style query: multiple assignments in if/elif tree Chris Angelico <rosuav@gmail.com> - 2014-04-01 17:55 +1100
      Re: Code style query: multiple assignments in if/elif tree Steven D'Aprano <steve@pearwood.info> - 2014-04-01 07:29 +0000
        Re: Code style query: multiple assignments in if/elif tree Chris Angelico <rosuav@gmail.com> - 2014-04-01 18:49 +1100
        Re: Code style query: multiple assignments in if/elif tree Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-01 02:29 -0600
        Re: Code style query: multiple assignments in if/elif tree Chris Angelico <rosuav@gmail.com> - 2014-04-01 19:56 +1100
    Re: Code style query: multiple assignments in if/elif tree David Hutto <dwightdhutto@gmail.com> - 2014-04-01 03:21 -0400
    Re: Code style query: multiple assignments in if/elif tree Chris Angelico <rosuav@gmail.com> - 2014-04-01 18:26 +1100
    Re: Code style query: multiple assignments in if/elif tree David Hutto <dwightdhutto@gmail.com> - 2014-04-01 03:34 -0400
    Re: Code style query: multiple assignments in if/elif tree David Hutto <dwightdhutto@gmail.com> - 2014-04-01 03:39 -0400
    Re: Code style query: multiple assignments in if/elif tree David Hutto <dwightdhutto@gmail.com> - 2014-04-01 03:46 -0400
    Re: Code style query: multiple assignments in if/elif tree Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-01 02:55 -0600

csiph-web