Re: python strings ( function func_doc strings )

jredford@lehman.com
Tue, 26 Apr 94 15:49:26 -0400

>> Re: syntax (a) vs. syntax (b)
>>
>> (1) Is only a string constant allowed ?
>> (2) or any string valued expression or variable ?
>>
>> I think it OUGHT to be (2) -
>> Which would also make (b) ambiguous, and (a) obvious and easily
>> parsable.
>>
>> def square( a ) "%(__name__).square: returns the square of a number." % vars()
>> :
>> return a * a

I have to also prefer (a) with (2), because it makes it possible for
one to define nice long descriptions for functions without having to
put them between the signature and body..

WRT the elisp-like 'first sentence' use.. one might as well make this
2 distinct strings in python.. or just index the whole documentation
string, or add a specific 'keywords' section... anything but actually
looking into the documentation strings themselves.

--
John Redford (AKA GArrow) | 3,600 hours of tape.
jredford@lehman.com       | 5 cans of Scotchguard.