1 2 3 4 5 6 7 8 9 10 11 12 13
class Callable(): """A callable object that behaves like a function.""" def __call__(self, arg1, arg2, **kwargs): pass def method(self, arg1, arg2): """docstring of Callable.method().""" pass function = Callable() method = function.method