[Doc-SIG] epydoc reST markup for stdlib docstrings
barry at python.org
Tue Apr 13 23:12:19 CEST 2010
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:
"""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
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?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: not available
More information about the Doc-SIG