On Thu, Mar 6, 2008 at 4:52 AM, Greg Kochanski <[EMAIL PROTECTED]> wrote:
> Package: python-epydoc
>  Version: 3.0.1-1
>
>  It's really nice to be able to put a comment on
>  a global variable with the #: operator.   I find
>  it much less distracting than the alternative, which is
>  to have lots of strings floating around in the code.

Epydoc already knows how to read multiline "#:" comments.  I
copy/pasted your example into a file, and ran epydoc on it, and the
variable "SomeOtherVariable" came out with the complete (multiline)
comment in its description.

If epydoc is only picking up one line of a "#:" comment in some
context, then it's a bug -- please send me a minimal file that
demonstrates the bug, and I'll try to track down what's causing it.
It's worth noting that epydoc requires every line in the comment to
begin with "#:", and that there shouldn't be any intervening blank
lines.  So the following will not do what you want:

#: the second line is just a hash, not a "#:"
# hello world.
x = 5

#: there's an intervening blank line

#: that breaks up these two comment lines.
y = 5

-Edward

p.s., note that, contrary to your example, string comments come
*after* the variable they document, to be consistent with docstrings.
I usually indent all but the first line, so it ends up looking like
this:

x = 5
"""This is a comment that describes
   the value of the variable x."""

Which is a little more visually distinct (esp with source
colorization); but I sometimes find the "#: form looks better, esp. if
the value of the variable takes up multiple lines.)



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to