epydoc help (putting XML in docstrings)
Jean-Paul Calderone
exarkun at divmod.com
Fri Mar 10 16:23:21 EST 2006
On 10 Mar 2006 12:49:29 -0800, "programmer.py at gmail.com" <programmer.py at gmail.com> wrote:
>Hi everyone! I'm documenting some functions that return XML strings.
>I'd like to have `sample' xml show up in my epydoc generated
>documentation. However, epydoc does not like the indentation of the
>XML and gives me this error ->
>
>L28: Error: Improper paragraph indentation.
>
>Here is a simple function that epydoc does not like:
>
>def test():
> """
> Return an XML string that looks like this::
>
> <TRANSACTION>
> <ID>123</ID>
> <STATUS>D</STATUS>
> ...
> </TRANSACTION>
>
> @return: XML string.
> """
> pass
>
>[jwyant at L-JWYANT:daplib]$ epydoc test.py
>Importing 1 modules.
> [.]
>Building API documentation for 1 modules.
> [.]
>===========================================================================
>C:\cygwin\home\jwyant\code\dap-support\python\daplib\test.py
>In test.test docstring (line 2):
>---------------------------------------------------------------------------
> L5: Error: Improper paragraph indentation.
>
>Any ideas?
>
def test():
"""
Return an XML string that looks like this::
<TRANSACTION>
<ID>123</ID>
<STATUS>D</STATUS>
...
</TRANSACTION>
@return: XML string.
"""
exarkun at kunai:~$ epydoc test.py
Importing 1 modules.
[.]
Building API documentation for 1 modules.
[.]
Writing HTML docs (10 files) to 'html'.
[..........]
Jean-Paul
More information about the Python-list
mailing list