pinard/Pymacs

clean doc-string before passing it to emacs

leoliu opened this issue · 3 comments

Example:

def whatsnew(arg):
    """
    What's the best way to handle this correctly?

    Multi-line doc-string.
    """
    pass

The doc string shows up nicely in pydoc but a bit weird in emacs. I wonder if the doc-string should be cleaned up by using http://docs.python.org/library/inspect.html#inspect.cleandoc before feeding to emacs?

Leo

Comments?

I also have a patch here, please review. Thanks.

leoliu@09cf254

Leo, still me!

OK, integrated as well, thanks!

While I do not like indented doc strings (it surely shows in my own code), many people do, so your patch is welcome for them. Moreover, it should not break anything for those who, like me, flush their doc strings to the left.

François