On Sun, Jul 10, 2016 at 9:03 AM, Marko Rauhamaa <ma...@pacujo.net> wrote: > Ian Kelly <ian.g.ke...@gmail.com>: > >> That's still excessive by any reasonable standards. Names should be >> descriptive, but no more verbose than necessary. How about: >> >> force_N = -G * mass1_kg * mass2_kg / distance_m ** 2 > > Why bother with tagging the names with standard units?
The point of the example was to demonstrate descriptive names. For local variables I usually wouldn't bother with the units, but in general it's a good practice to help avoid crashing your orbiter into Mars. > Shouldn't it be G_N_m2_per_kg2, given your strategy for identifying the > units associated with the other variables? To me, the use of the standard name implies standard units, so no, "G" is sufficient. YMMV. -- https://mail.python.org/mailman/listinfo/python-list