On Sep 29, 2012 11:52 AM, "Steven D&apos;Aprano" <st...@pearwood.info>
wrote:
>
> On 29/09/12 19:16, Alan Gauld wrote:
>>
>> As to using short names to keep things on a single line, there is a huge
>> body of research in Comp Science that shows that meaningful names
outweigh
>> single line expressions every time in terms of reliability,
comprehension,
>> ease of maintenance etc.
>
> If somebody doesn't understand:
>
> p = m*v*(1-(c/v)**2)**-0.5

It should be v/c not c/v. To give some relevance to this otherwise pedantic
post I'll say that I find it much easier to spot the mistake in the line
above than the line below. This is precisely because the line above
resembles the way the equation would normally be written in a book or on
the blackboard etc.

>
> they aren't likely to be much enlightened by:
>
> momentum = rest_mass*velocity*(1-(speed_of_light/velocity)**2)**-0.5
>

Oscar
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to