Code style query: multiple assignments in if/elif tree

Chris Angelico rosuav at gmail.com
Tue Apr 1 03:26:30 EDT 2014


On Tue, Apr 1, 2014 at 6:21 PM, David Hutto <dwightdhutto at gmail.com> wrote:
> The difference in our opinions, seems to be that there is an initial resting
> state, and not at an already accelerated motion that has reached it's
> maximum capacity.
>
>
> So there is a dynamic in my mind's eye, where the object is at a "resting"
> point initially, and either the environment, or the object can maneuver
> their own viscosity in relation to the other.

The initial state, in this problem, is of a vehicle moving at a known
speed (an input to the formula; it's a variable, but one that we know
at that point). Friction, viscosity, etc, etc, etc are all handled
elsewhere; these trains are generally way overpowered, and the onboard
computer caps the power and non-emergency braking such that the change
in speed never exceeds 0.85 m/s/s. I don't know how exactly it goes
about that, but for the purposes of this test, we can assume that it's
able to achieve that acceleration.

ChrisA



More information about the Python-list mailing list