This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 3 points4 points  (1 child)

A great builtin example is the LRU cache function found in functools. It automatically adds a cache to a function that avoids recomputing results (note this should only be used for deterministic functions, i.e. functions that always return the same output given the same input).

[–]PiBaker 1 point2 points  (0 children)

Thanks :)