Objects that represent potential behavior (functions and methods) can be invoked, or called. We can test an object's callability with the callable() function:
>>> def simple_cache(fn):
... cache = {}
...
... def new_fn(n):
... if n in cache:
... print 'FOUND IN CACHE; RETURNING'
... return cache[n]
...
... # otherwise, call function & record value
... val = fn(n)
... cache[n] = val
... return val
...
... return new_fn