def __str__(self):
        out = ''
        doclines = inspect.getdoc(self._f) or ''
        try:
            doc = SphinxDocString(doclines)
        except Exception as e:
            print('*'*78)
            print("ERROR: '%s' while parsing `%s`" % (e, self._f))
            print('*'*78)
            #print "Docstring follows:"
            #print doclines
            #print '='*78
            return out

        if doc['Signature']:
            out += '%s\n' % header('**%s**' %
                                   doc['Signature'].replace('*','\*'), '-')
        else:
            try:
                # try to read signature
                argspec = inspect.getargspec(self._f)
                argspec = inspect.formatargspec(*argspec)
                argspec = argspec.replace('*','\*')
                out += header((self._f.__name__, argspec) % '%s%s', '-')
            except TypeError as e:
                out += '%s\n' % header('**%s()**'  % self._f.__name__, '-')

        out += str(doc)
        return out
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/devtools/tests/docscrape.py/FunctionDoc.__str__/swapped operands of `%`