Doc Strings : Documentation « Function « Python Tutorial






def func(params):
    """Do something with a dictionary of parameters.
    Parameter 1 is blah
    Parameter 2 is blah
    """

class Foo :
    """ This is a document string for the Foo class.
    """
    x = 1


dir(Foo)
print Foo.__doc__








10.8.Documentation
10.8.1.Documenting Functions
10.8.2.Special comments called documentation strings, or "doc strings"
10.8.3.Doc Strings