clean doc-string before passing it to emacs
leoliu opened this issue · 3 comments
leoliu commented
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
leoliu commented
Comments?
leoliu commented
I also have a patch here, please review. Thanks.
pinard commented
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