Say you have the following decorator. How can it be changed to say add some links to a list of all the functions that it decorates?
def memoize(obj): cache = obj.cache = {} @functools.wraps(obj) def memoizer(*args, **kwargs): if args not in cache: cache[args] = obj(*args, **kwargs) return cache[args] return memoizer @memoize def foo(bar): return bar ** 3
user3921265
source share