[Edu-sig] Long Integer Fractions

Tony J Ibbs (Tibs) tony@lsl.co.uk
Thu, 18 May 2000 11:44:40 +0100


After looking at the doc string for the function gcd:
>def gcd(a, b):
>	"""Return GCD of two numbers.  Duh!
>	"""

Kirby Urner wrote:
> Maybe Lanny wrote "Duh!" because this is one of the
> oldest algorithms on record, and would be recognized
> by just about anyone with training in computer science
> and numerical methods.

Umm - surely the "Duh" is because the doc string is rather meaningless?

(on the lines of "well, I believe in writing doc strings, but heh, you
already *knew* this was called "gcd" - what did you *think* it did?" - that
is, recognising the function *name* rather than the algorithm...)

(and assuming the doc string is aimed at someone querying what the function
is for through an IDE of some sort, rather than at the person reading the
code)

Tibs

--
Tony J Ibbs (Tibs)      http://www.tibsnjoan.demon.co.uk/
Give a pedant an inch and they'll take 25.4mm
(once they've established you're talking a post-1959 inch, of course)
My views! Mine! Mine! (Unless Laser-Scan ask nicely to borrow them.)