On Thu, 22 Apr 2004, Phil Hodge wrote:
I have a nit-picking comment.
def clDms(x,digits=1,deg=1):
"""Convert float to d:m:s.s
Number of decimal places on seconds is set by digits.
If deg is false, prints just m:s.s (omits degrees).
"""
If deg=0, clDms actually prints degrees, minutes, decimals of minutes.
Saying that it prints "just m:s.s" implies that the degrees portion
of the value is discarded. If x = 89.308333333, for example, the
distinction is between 89:18.5 and 18:30.0, and clDms prints the former.
Thus the 'deg' keyword is not a very good choice of name; maybe dms or
dms_format would be better.
You're right, this is a pretty dumb way to describe what it does. I think this
is a case of the interface reflecting far too much detail about the algorithm
actually used inside the routine. (If you read through the code you'll see
that it actually *does* omit the degrees as far as the logic of the
program is concerned.)
I'm just a little nervous about changing it. I suppose there is some faint
chance that someone used the old interface. What do you think, Perry?
Can I just change it, or do we need to preserve the deg keyword for
backward compatibility?
Rick