Re: On-line help for Python

Steven D. Majewski (sdm7g@elvis.med.virginia.edu)
Mon, 15 Nov 1993 15:49:53 -0500

The one thing I glossed over in the previous post was that my proposal
would require that functions (at least, and to be consistant, maybe
all other objects ) that do no now currently have attributes ( and
respond to 'setattr' by saying they are read only ) would have to
support having an associated __help__ attribute - either a function
returning a string, or a string itself.

It could be implemented right now for modules, classes and instances
( with a little awkward programming to distinguish between a classes
help and an instances help - if it was necessary to distinguish them. )
but for functions and methods to have attributes would require some
changes.

How awkward would that be to support, Guido ?
Ignoring, for the moment, that I have no good suggestion for a
nice syntax, and it might have to be done via something ugly, like:
def func(): ...
def __func__help__():
setattr( func, '__func__help__', __func__help__ )

How (un-?)reasonable would the support for visible attributes for
functions, methods, etc. be ?

- Steve Majewski