[Techtalk] Python doc strings

Mary mary-linuxchix at puzzling.org
Mon Apr 26 09:53:39 EST 2004


On Sun, Apr 25, 2004, Carla Schroder wrote:
> Hidy ho,
> 
> What reads Python doc strings? Just to be crystal clear, I mean the comments 
> that are surrounded by quotation marks:

help(object) will read them:

def my_function():
    '''
    My function does a million things.
    '''
    pass

help(my_function)

Help on function my_function in module __main__:
 
my_function()
    My function does a million things.

-Mary


More information about the Techtalk mailing list