def __call__(self, *args):
        args = self.args or args
        if not isinstance(args, collections.Hashable):
         # uncacheable. a list, for instance.
         # better to not cache than blow up.
         return self.func(*args)

        if args in self.cache:
            return self.cache[args]
        else:
            value = self.func(*args)
            self.cache[args] = value
            return value
dataset/ETHPy150Open potatolondon/djangae/djangae/utils.py/memoized.__call__/original