def getMethodNameAndOutput(self, proto):
        # NAME AND RETURN TYPE
        memb = proto.findAll( 'td', **{'class':'memname'} )[0]
        buf = [ x.strip().encode('ascii', 'ignore') for x in memb.findAll( text=True )]
        if len(buf) ==1:
            buf = [ x for x in buf[0].split() if x not in ['const', 'unsigned'] ]
            if len(buf)==1:
                returnType = None
                methodName = buf[0]
            else:
                returnType = ''.join(buf[:-1])
                methodName = buf[-1]
        else:
            returnType = buf[0]
            methodName = buf[1]
            buf = [ x for x in buf[0].split() if x not in ['const', 'unsigned'] ]
            if len(buf) > 1:
                returnType += buf[0]
                methodName = buf[1]

        methodName = methodName.split('::')[-1]

        # convert operators to python special methods
        if methodName.startswith('operator'):
            methodName = self.getOperatorName(methodName)
        else:
            #constructors and destructors
            if methodName.startswith('~') or methodName == self.apiClassName:
                methodName = None
        # no MStatus in python
        if returnType in ['MStatus', 'void']:
            returnType = None
        else:
            returnType = self.handleEnums(returnType)

        return methodName, returnType
dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.5/pymel/internal/parsers.py/ApiDocParser.getMethodNameAndOutput/original