Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.075 X-Spam-Evidence: '*H*': 0.85; '*S*': 0.00; 'subject:query': 0.07; 'suddenly': 0.07; 'linear': 0.09; '0.2': 0.16; 'averaging': 0.16; 'seconds.': 0.16; 'wrote:': 0.18; 'error': 0.23; 'subject:Code': 0.24; 'second': 0.26; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'correct': 0.29; 'am,': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'posting': 0.31; 'continues': 0.31; 'problem.': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'method': 0.36; 'seconds': 0.37; 'two': 0.37; 'to:addr:python-list': 0.38; 'does': 0.39; 'realize': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'ian': 0.60; 'entire': 0.61; 'matter': 0.61; 'first': 0.61; 'total': 0.65; 'different': 0.65; 'average': 0.93; 'thereafter': 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:to :content-type; bh=NasdDFBfOYVBrg+TZ570z7U2qH5zqfJ1vZAPQIkmaxo=; b=eMNNrKU9sdK+J2cUEHqplHZNmplvJOLS7Eibbj7x/mktAdyMfCCpZJYfik45d6CCHJ SRe9ZVCgxcD+u2SxtebmzCorPvAvHA0JUuM3FJwA38ocqRpZHrRUo1hU2f6jGu3hw46t md8SvB57HKYY6on7NOVqiTGgFZtZ6PBGHM2GQmYRBcuHXUkMi2uXA0ckhfz6yhaKzZQL R6xcq5lVIUNbO2D+m4o9a+s2AS2H/iUaO8y5dBt0nwOUWD8alEyLg91sb6p9ACr6u2Qf 6GuvBPhmiy9KRc65JB28vxIuD4/ubXV1fPKMh19dnnGORXfW+NLdK4goHtk5GywOXOd7 WVEw== X-Received: by 10.69.17.230 with SMTP id gh6mr30034064pbd.0.1396340686693; Tue, 01 Apr 2014 01:24:46 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <533a3fd8$0$2909$c3e8da3$76491128@news.astraweb.com> <533a68c3$0$2909$c3e8da3$76491128@news.astraweb.com> From: Ian Kelly Date: Tue, 1 Apr 2014 02:24:06 -0600 Subject: Re: Code style query: multiple assignments in if/elif tree To: Python 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1396340689 news.xs4all.nl 2887 [2001:888:2000:d::a6]:37644 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:69492 On Tue, Apr 1, 2014 at 2:18 AM, Ian Kelly wrote: > The reason the velocity is different after 2 seconds is because the > linear deceleration does not match the constraints of the problem. The > average deceleration for the first second is not 0.2 m/s, and the > average deceleration for the second second is not 0.425 m/s. Which I suddenly realize after posting makes my entire point moot. It doesn't matter how much total error there is from the linear deceleration method because the linear deceleration is wrong. As long as the averaging method has the actually correct velocity at 2s and thereafter continues to have the actually correct velocity, it will only be off by that small amount of error from the first two seconds.