Thanks very much for your help<br><br>
<div class="gmail_quote">On Wed, Jul 22, 2009 at 6:43 PM, Lie Ryan <span dir="ltr"><<a href="mailto:lie.1296@gmail.com">lie.1296@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div></div>
<div class="h5">jorma kala wrote:<br>> Hi,<br>> Do you know where I can find the rules for documenting Python code, so<br>> that automatic document generation with Pydoc makes the most of the<br>> comments inserted in the code?<br>
> I know about documenting class and method through triple quote just<br>> under the class definition. But how do you comment a specific field or<br>> variable, or how do you document function arguments so that they are<br>
> extracted like in javadoc?<br>> Thanks very much<br><br></div></div>pydoc is a simple tool, and doesn't do much. You write in freeform,<br>although generally you'll do something like this:<br><br>def myfunc(a, b):<br>
'''<br> short description of myfunc<br><br> longer description of myfunc, if necessary, and typically includes<br> description of the arguments and the behaviors. Also includes the<br> description of the return value.<br>
'''<br><br> pass<br><br>pydoc doesn't recognize any special markups. If you want to get more<br>from the docstring, you need other documentation generator such as<br>epydoc, Doxygen, or Sphinx.<br><font color="#888888"><br>
--<br><a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br></font></blockquote></div><br>