Jonathan Bowman

Tags: functional

Memoized Functions in Python with functools.lru_cache

“A memoized function ‘remembers’ the results corresponding to some set of specific inputs.” (From Wikipedia’s Memoization article). I think of memoization as an internal smart cache. A memoized function caches the results dependent on the arguments.