470,834 Members | 1,714 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,834 developers. It's quick & easy.

epydoc help (putting XML in docstrings)

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@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?

Thanks!

Mar 10 '06 #1
2 1422
pr***********@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@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?

Thanks!


Just indent the xml:

def test():
"""
Return an XML string that looks like this::

<TRANSACTION>
<ID>123</ID>
<STATUS>D</STATUS>
...
</TRANSACTION>

@return: XML string.
"""
pass

James

--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/
Mar 10 '06 #2
Doh. That was too easy.

Thanks!
jw

Mar 10 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Sridhar R | last post: by
2 posts views Thread by Steven Bethard | last post: by
reply views Thread by simon | last post: by
reply views Thread by Laszlo Zsolt Nagy | last post: by
2 posts views Thread by Neil Benn | last post: by
2 posts views Thread by Don Taylor | last post: by
reply views Thread by Edward Loper | last post: by
reply views Thread by tom | last post: by
reply views Thread by davels | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.