Jump to content

Catalan numbers: Difference between revisions

Line 1,603:
def memoized(key):
# Returned, new, memoized version of decorated function
if key not in cache:
return cache[key] = func(key)
else:return cache[key]
cache[key] = result = func(key)
return result
return functools.update_wrapper(memoized, func)
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.