<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div><br><blockquote type="cite"><div>I found one here after some random browsing:&nbsp;<a href="http://cctbx.sourceforge.net/current/python/rstbx.viewer.html">http://cctbx.sourceforge.net/current/python/rstbx.viewer.html</a>, i.e.</div></blockquote><blockquote type="cite"><div><br></div><div><dt style="font-family:'Times New Roman';font-size:medium;background-color:rgb(240,240,248)"><a name="image-get_intensities_in_box"><strong>get_intensities_in_box</strong></a>(self, x, y, boxsize<font color="#909090">=400</font>, mag<font color="#909090">=16</font>)</dt>

<dd style="font-family:'Times New Roman';font-size:medium;background-color:rgb(240,240,248)"><tt>#&nbsp;XXX&nbsp;does&nbsp;this&nbsp;need&nbsp;to&nbsp;be&nbsp;in&nbsp;C++?</tt></dd></div></blockquote><blockquote type="cite"><div><div><br></div><div>which looks to me like it comes from rstbx/viewer/__init__.py. </div></div></blockquote><div><br></div><div><br></div>The current code is<br><div><br></div><div><div><div>&nbsp; # XXX does this need to be in C++?</div><div>&nbsp; def get_intensities_in_box (self, x, y, boxsize=400, mag=16) :</div><div><br></div><div>I would not have thought that this comment would be picked up as if it was a docstring for that function.</div></div></div><br><blockquote type="cite"><div><div>I don't suppose this is a problem, I'm just trying to understand what the rules are when the code is scraped for docs.</div></div></blockquote><div><br></div><div>It is definitively not recommended to rely on that "feature" above: proper docstrings is the way to go. Ideally every module, every class, every function should have a docstring. For the functions, it should explain what are the arguments for &nbsp;(especially if their name are not obvious), what types are ok. For classes, attributes that are public should be documented (I believe this can be done by adding a docstring after self.attr = ... in def __init__ but I am not 100% sure).</div><div><br></div><div>In practice, you will find this is rarely done.&nbsp;</div><div><br></div><div>Luc</div><div><br></div></div></body></html>