Physical constants
Tommy Grav
tgrav at mac.com
Fri Nov 3 18:57:49 EST 2006
I have some code for doing orbital computations. The code is kind of
extensive with many classes, each having several functions. In these
functions I need to use constants (like the gravitational constant).
What is the best way of implementing a solution when constants are
used in several different classes and functions? I do not want to
pass the constant down through the functions. I have thought of
making a class of constants but I do not want to invoke an
instant in each function. How is the pi and e constants in math
coded?
Tommy
tgrav at mac.com
http://homepage.mac.com/tgrav/
"Any intelligent fool can make things bigger,
more complex, and more violent. It takes a
touch of genious -- and a lot of courage --
to move in the opposite direction"
-- Albert Einstein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20061103/bd59c0af/attachment.html>
More information about the Python-list
mailing list