def docstr2rst(docstr):
 idx_whitespace = (len(docstr.rstrip()) - len(docstr))
 whitespace = docstr[idx_whitespace:]
 return (eval(docstr) + whitespace)

def docstr2rst ( docstr ) : idx_whitespace = ( len ( docstr . rstrip ( ) ) - len ( docstr ) ) whitespace = docstr [ idx_whitespace : ] return ( eval ( docstr ) + whitespace )
return restructuredtext from docstring .