def descrFromDoc(obj):
    if obj.__doc__ is None or obj.__doc__.isspace():
        return None

    lines = [x.strip() for x in obj.__doc__.split("\n")
                             if x and not x.isspace()]
    return " ".join(lines)
Generate an appropriate description from docstring of the given object
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/python/_shellcomp.py/descrFromDoc