how to add pydoc strings to 'Data and other attributes'

News123 news123 at free.fr
Sat Feb 6 16:45:01 EST 2010


I'm having some problems with pydoc and I was not very sucessful in
googling. (probably missng one key word)

Is there soemthing like a documentation of pydoc (execpt pydocs output
of pydoc,  which doesn't seem to answer my question )

I can add docstrings to
- the file head
- to a class
- to a class function
- to a property

but I don't know how document a class attribute (like 'name' ) in my
example below


Does anybody know how to doc it?

# file starts here

#
#############################################################################
# This appears in the python documentation
#
#############################################################################

__author__ = 'News123' # this will also be part of pydoc

""" general blabla will not be part of pydoc"""

class MyClass(object):
    """ This class can be doc-ed """

    name = 3 ### I don't know how to document this

    def get_f(self):
        """ the function get_f is here """
        return 3

    f = property(get_f,doc="this property is also documented")

######### file ends here


thanks for any help


N



More information about the Python-list mailing list