def _doc(self, result):
        docloc = None
        if hasattr(result, '__doc__'):
            if result.__doc__ is not None:
                docstr = result.__doc__
            elif inspect.ismethod(result):
                bases = inspect.getmro(result.im_class)
                found = False
                for base in bases:
                    if hasattr(base, result.__name__):
                        baseres = getattr(base, result.__name__)
                        if (hasattr(baseres, '__doc__')
                            and baseres.__doc__ is not None):
                            docloc = baseres
                            docstr = baseres.__doc__
                            found = True
                            break
                if not found:
                    docstr = None
            else:
                docstr = None
            print "\"\"\"%s\"\"\"" % docstr
            if docloc:
                print "(Found doc in %s)" % docloc
            
        if inspect.isclass(result):
            if hasattr(result, '__init__'):
                self._define(result)
                if hasattr(result.__init__, '__doc__'):
                    print result.__init__.__doc__ % "\"\"\"%s\"\"\""
            else:
                print "No init function"
dataset/ETHPy150Open sassoftware/conary/conary/lib/epdb_embedded/__init__.py/Epdb._doc/swapped operands of `%`