[Doc-SIG] epydoc reST markup for stdlib docstrings

Barry Warsaw barry at python.org
Tue Apr 13 23:12:19 CEST 2010


Hello Doc-Siggers,

During some recent work on the PEP 3147, I had a need to add some
documentation (docstrings) to some new functions.  To document the function
arguments I added epydoc reST style markup:

def ensure_bytecode_path(bytecode_path):
    """Ensure that the __pycache__ directory for PEP 3147 pyc file exists.

    :param bytecode_path: File system path to PEP 3147 pyc file.
    """

Now, I didn't even think twice about this because several of the larger Python
projects I work on have already adopted epydoc reST markup for API.  During
his review, Antoine disapproved of this, pointing to PEPs 257 and 287.  My
reading of these PEPs however, certainly doesn't prohibit the use of epydoc
reST markup.  Georg and I pointed to the lack of a clear, consistent convention
in the Python stdlib.  I would like to propose that epydoc reST markup be made
that convention.

http://epydoc.sourceforge.net/epydoc.html#epydoc-fields

PEP 257 does include an example for keyword arguments, but not much more is
said about them.  epydoc reST markup is compliant with PEP 287 IMO, by
adopting reST syntax.  I think Sphinx does a pretty good job of handling such
API markup too.

A PEP might be necessary to make this a firm decision.  What do you think
about adopting epydoc reST markup for documenting the stdlib API?

-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/doc-sig/attachments/20100413/0fa05da8/attachment.pgp>


More information about the Doc-SIG mailing list