A question about help() and docstrings
Sean 'Shaleh' Perry
shalehperry at attbi.com
Wed Apr 2 09:43:10 EST 2003
On Wednesday 02 April 2003 06:24, Richard Kuhns wrote:
> Given a file dummy.py as follows:
> ====
> def dummy_function(one, two):
> """This is a rather stupid function.
> """
> print "1 + 1 = 3"
> ====
>
> The doc string shows up just fine. However, if I use 'from dummy import
> *' help() no longer knows anything about it.
>
in honor of teaching people to fish ....
look at site.py in your python directory. help() is defined there as a
function wrapping an instance of a class. The class comes from pydoc.py in
the same directory. Give it a peak.
More information about the Python-list
mailing list