Fill comment paragraph command - error msg is confusing


Tools->Python Tools->Fill Comment Paragraph command

When you invoke the command on a line of code, you get a confusing error message:
"Must invoke FillCommentParagraph on a comment line or non-blank line."

A line of code is a non-blank line, so I wasn't sure what that meant.

Then I tried to invoke it on a line with a # comment and nothing happened. I thought maybe it was related to generating docstring for you automatically, so I put the cursor on the function declaration line and I got the same error.

I had to look at the comments in the implementation of the command in order to figure out what it is supposed to do.

It turns out it takes consecutive lines of comments and optimizes them so that lines are filled up to 80 characters. Lines longer than 80 chars are split.

The curious thing is that this does not work on multi line doc strings in the form ''' '''

And I would expect a command like this to appear in the editor context menu, not in tools menu. With a better command name... maybe "Reformat comment"


Zooba wrote Aug 27, 2013 at 9:15 PM

Message should refer to "Fill Comment Paragraph", not "FillCommentParagraph".