def __call__(self, *args, **kw):
        obj = args[0]
        try:
            cache = obj.__cache
        except __HOLE__:
            cache = obj.__cache = {}
        key = (self.func, args[1:], frozenset(kw.items()))
        try:
            res = cache[key]
        except KeyError:
            res = cache[key] = self.func(*args, **kw)
        return res
dataset/ETHPy150Open koenbok/Cactus/cactus/utils/helpers.py/memoize.__call__