

def get(self, instance, methodName, default=_nodefault):
    '\n        Retrieve an exposed method with the given name from the given instance.\n\n        @raise UnexposedMethodError: Raised if C{default} is not specified and\n        there is no exposed method with the given name.\n\n        @return: A callable object for the named method assigned to the given\n        instance.\n        '
    method = getattr(instance, methodName, None)
    exposedThrough = getattr(method, 'exposedThrough', [])
    if (self not in getattr(method, 'exposedThrough', [])):
        if (default is self._nodefault):
            raise UnexposedMethodError(self, methodName)
        return default
    return method

dataset/ETHPy150Open twisted/nevow/nevow/util.py Expose.get/original