[issue12630] pydoc does not remove '#'-s from doc comments

tkiss80 report at bugs.python.org
Mon Jul 25 01:05:00 CEST 2011


New submission from tkiss80 <tkiss80 at gmail.com>:

If an entity does not have a docstring, pydoc.getdoc() reads the comment associated with that entity and uses that as the source of documentation. However, inspect.getcomments() returns the raw comment with the comment signs ('#') in it, thus the resulting documentation looks ugly and confusing. Is there a way to solve this problem?

I know that this is not an easy task, because by implementing a specific '#' removing solution, the format of the doc comments would be restricted to conform to that algorithm with little formatting freedom. But maybe someone can come up with a good idea, such as counting '#'-s in the first line and strip all the lines accordingly.

----------
messages: 141061
nosy: tkiss80
priority: normal
severity: normal
status: open
title: pydoc does not remove '#'-s from doc comments
type: behavior
versions: Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12630>
_______________________________________


More information about the Python-bugs-list mailing list