Get the doc string or comments for an object.
(object)
| 184 | return inspect.cleandoc(doc) |
| 185 | |
| 186 | def getdoc(object): |
| 187 | """Get the doc string or comments for an object.""" |
| 188 | result = _getdoc(object) or inspect.getcomments(object) |
| 189 | return result and re.sub('^ *\n', '', result.rstrip()) or '' |
| 190 | |
| 191 | def splitdoc(doc): |
| 192 | """Split a doc string into a synopsis line (if any) and the rest.""" |