[PYTHON DOC-SIG] doc string style question

Michael McLay mclay@eeel.nist.gov
Thu, 22 Aug 1996 12:22:48 GMT


My docstring style keeps dithering since I haven't found a well
defined convention to follow.  Is there a WWW page on this that I've
missed?   What's the recommended style for writting doc strings inside
classes and function.  Here is a foo and a bar example that can be
used for discussing the issue:

class foo:
    """holds a foo, but if the doc string is long the lines needs
to be wrapped to the next line"""
    def foofunc(self):
	"""foofunc definitions can often be longer than one line.
Should they wrap and not indent"""


class bar:
    """holds a bar, but if the doc string is long the lines needs
	   to be wrapped to the next line"""
    def barfunc(self):
	"""barfunc definitions can often be longer than one line.
	   Should they wrap and indent"""

If indent is correct, should the next line be lined up with the first '"'
mark or the first character in the quote?


    def barfunc(self):
	"""barfunc definitions can often be longer than one line.
	   Should they wrap and indent"""

or 

    def barfunc(self):
	"""barfunc definitions can often be longer than one line.
        Should they wrap and indent"""

Opiniions?
 
Michael

=================
DOC-SIG  - SIG for the Python Documentation Project

send messages to: doc-sig@python.org
administrivia to: doc-sig-request@python.org
=================