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

N

News123

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top