def __get__ ( self , obj , objtype ) : if not self . is_method : self . is_method = True return functools . partial ( self . __call__ , obj )
python restrict methods to certain objects
Support instance methods .
def __get__(self, obj, objtype):
        if not self.is_method:
            self.is_method = True
        """Support instance methods."""
        return functools.partial(self.__call__, obj)